Memory allocated in a DLL must be released in the same DLL. Memory allocated in the main *.exe program must be released in the main application program. You cannot allocate memory in the DLL and release it (delete or delete[] or free() ) it in the main application program. So if the DLL populate the std::list then it must also destroy it.
Second problem: Borland and Microsoft may have very different implementations of std::list, so the two may or may not be compatible.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
>>Where would the std::list implementation reside?
header file. There may or may not be a *.cpp file. If there is then you will not have access to it unless you paid $$$ for the source code.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
Second problem: Borland and Microsoft may have very different implementations of std::list, so the two may or may not be compatible.
Found out there are two different implementation of the same interface: one of them is in Visual C++, the other in Borland. One pointer created on one side has no meaning on the other end; that's why the program crashes; the approach wasn't the correct one.
**sigh** why did I waste my time with this.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343