Commit 97739b02 authored by claes's avatar claes

Bugfix, the destructor didn't unref m_bdrep

parent 573c0808
......@@ -20,6 +20,12 @@ wb_bdef::wb_bdef(const wb_bdef& x) : wb_status(x.m_sts), m_bdrep(x.m_bdrep)
m_bdrep->ref();
}
wb_bdef::~wb_bdef()
{
if ( m_bdrep)
m_bdrep->unref();
}
wb_bdef& wb_bdef::operator=(const wb_bdef &x)
{
if ( x.m_bdrep)
......
......@@ -24,7 +24,7 @@ public:
wb_bdef(const wb_adef *a);
wb_bdef(const wb_orep *o, pwr_eBix bix);
~wb_bdef() {}; // Fix
~wb_bdef();
operator bool() const { return (m_bdrep != 0);}
operator wb_bdrep*() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment