[Mono-devel-list] Garbage Collection and Embedding
malekith at pld-linux.org
Fri Jun 25 16:04:29 EDT 2004
On Fri, Jun 25, 2004 at 04:38:40PM +0200, Joe Ante wrote:
> I just got hit by the garbage collector collecting MonoObject's that a C++
> class still had a ptr to.
> I am storing the ptrs in a C++ class allocated with new.
> I presume that the GarbageCollector doesn?t scan my C++ class.
> Now I certainly don?t want to allocate my C++ class using GC_ALLOC.
AFAIK there is a way to supply user defined new operator, calling
whatever allocation routine you want. Just call GC_ALLOC there and keep
using new :-)
: Michal Moskal :: http://www.kernel.pl/~malekith :: GCS !tv h e>+++ b++
: ::: Logic is a nice contrast to the Real World. :: UL++++$ C++ E--- a?
More information about the Mono-devel-list