J
jim.wiese
I've got a question which is hopefully a very simple one: I have an
unmanaged DLL which has abstracted the memory management such that I
can supply the malloc and free methods.
(ie)
void __nogc * pascal myMalloc (struct tag_MemoryStream __nogc * pX,
size_t cb) ;
void pascal myFree (void __nogc * pX, void *ptr) ;
.... I'd like to implement these methods such that I create and return a
managed array which is not GC'ed (ie GC::KeepAlive()) and returned,
then when myFree is called, I'd like to convert this back again (ie
GC::ReRegisterForFinalize( bytes )). Does anyone have an idea of how
to best go about this in managed C++?
unmanaged DLL which has abstracted the memory management such that I
can supply the malloc and free methods.
(ie)
void __nogc * pascal myMalloc (struct tag_MemoryStream __nogc * pX,
size_t cb) ;
void pascal myFree (void __nogc * pX, void *ptr) ;
.... I'd like to implement these methods such that I create and return a
managed array which is not GC'ed (ie GC::KeepAlive()) and returned,
then when myFree is called, I'd like to convert this back again (ie
GC::ReRegisterForFinalize( bytes )). Does anyone have an idea of how
to best go about this in managed C++?