Hi everybody:

I do not know if this is the right newsgroup to post my question, but
any help or tip will be very appreciated.

I am writing (from the scratch) a cross platform C++ library to handle
data structures (linked lists, hash tables, etc.); I am also using a
reference counter MPtr<T> that all my data structures use.

All the objects that I work are instances of my MObject class, that has
a mRefCount attribute and a static instanceCount that indicates how
many objects are alive now (it gives me some view about leaked
objects).

Ok, my code works perfectly with Visual C++ 8.0, but when I compile it
using mingw and gcc 3.4.1 on another platforms (like FreeBSD), it
returns me a lot of non deleted objects.

Using the gdb, I noticed that sometimes the destructor of the
referenced object is not called from my MPtr<T>::~MPtr().

Are there some "liberties" working with Visual C++ 8 that are no part
of the standard C++? A gcc bug? A "good luck bug" from me? Maybe gcc
4.0 can have the answer?

Thanks in advance, saludos



ernesto

_______________________________________________
Help-gplusplus mailing list
Help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to