[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Crossplatform and templates
From: |
ernesto |
Subject: |
Crossplatform and templates |
Date: |
10 Oct 2005 11:19:07 -0700 |
User-agent: |
G2/0.2 |
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
- Crossplatform and templates,
ernesto <=