Vittorio Digilio wrote:
Unfortunately it lacks (almost completely :-) ) a full C++ documentation (anybody, as a long-term user wrote down something and is willing to share, thanks :-) ), so I started experimenting and inspecting the C++ src code.
Does http://www.equi4.com/metakit/api/hierarchy.html help?
I noticed that c4_Property, though being the base class for the other properties, provides a non-virtual destructor.
[...]
In this scenario deleting the heap-allocated derived class shouldn't call the base class c4_Property::~c4_Property() destructor and the reference wouldn't be released.You mean should be virtual?
I mean :
c4_Property *pMyInt=new c4_IntProp("age");
//....
//....
delete pMyInt; // c4_Property::~c4_Property() should'nt be called
// and Refs(-1) isn't called either
Perhaps I'm missing here something really big and the destructor should be non-virtual ?!
I don't know, but properties are not intended for the heap. Why not simply:
c4_IntProp pMyInt ("age");
-jcw
_______________________________________________
metakit mailing list - [EMAIL PROTECTED]
http://www.equi4.com/mailman/listinfo/metakit