CPB Mailing List

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Question: DLLs, dynamic memory allocation/deallocation



Is there any reason why memory allocated
in a main program can't be deallocated in
a DLL that has been passed its pointer?

I make large memory blocks in one module, then 
pass a pointer to the memory to another module for
processing.  The second module takes responsibility
for deleting the memory when it is finished 
processing.  When I try to move the second
module into its own DLL, everything works fine
until the DLL tries to delete the memory; then
I get an access error.

[BCB1 is being used.]  

Any suggestions would be greatly appreciated.
Fredrick Seguin
seguin@psfc.mit.edu


W Komornicki's Home Page | Main Index | Thread Index