Commit 573c0808 authored by claes's avatar claes

Bugfix, m_nRef wasn't initialized

parent ed5d1d07
#include "wb_orep.h" #include "wb_orep.h"
wb_orep::wb_orep() : m_nRef(0)
{
}
void wb_orep::unref() void wb_orep::unref()
{ {
if (--m_nRef == 0) if (--m_nRef == 0) {
delete this; delete this;
}
} }
wb_orep *wb_orep::ref() wb_orep *wb_orep::ref()
......
...@@ -17,11 +17,13 @@ class wb_orep ...@@ -17,11 +17,13 @@ class wb_orep
protected: protected:
wb_vrep *m_vrep; wb_vrep *m_vrep;
public:
int m_nRef; int m_nRef;
public: public:
//virtual wb_orep(int oid) = 0; //virtual wb_orep(int oid) = 0;
wb_orep();
virtual ~wb_orep() {} virtual ~wb_orep() {}
void unref(); void unref();
......
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