[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C++ extension and garbage collection
At Tue, 26 Mar 2002 11:31:26 -0800 (PST), Ron Stanonik wrote:
> I asked that question because mzscheme/gc/gcc_support.c defined __builtin_new
> to call GC_malloc_uncollectable.
MrEd doesn't use that. It uses plt/src/wxcommon/wxGC.cxx, instead.
> "void *operator new" is getting called and not protecting C++ objects
> from the garbage collector.
The implementation of MrEd doesn't want C++ to be "protected" from the
garbage collector; for a variety of reasons (not performance :), MrEd's
C++ objects are meant to be GCed.
Of course, this causes problems for C++ objects that aren't meant to be
GCed. One solution is to change MrEd to explicitly call GC_malloc
instead of redirecting `new'. That's probably the right one, but it
will take some time.
Matthew