On 05/04/2011 08:01 AM, zeb wrote:
hi, I have some problem about transfer-ownership. C++ code is like this:
class RefCounter {
int _count;
public:
RefCounter() : _count(1) {}
virtual RefCounter() {}
void addRef() { ++_count; }
void release() { --_count; if (_count == 0) d
hi, I have some problem about transfer-ownership. C++ code is like this:
class RefCounter {
int _count;
public:
RefCounter() : _count(1) {}
virtual RefCounter() {}
void addRef() { ++_count; }
void release() { --_count; if (_count == 0) delete this; }
};
class A : public RefCoun