4 ms·
Most often, yes. As a consequence, you'll often see DLLs with a "createFoo" and a "deleteFoo" functions for creating and deleting Foo objects. The reason is tha
by Asooka 5y ago
Most often, yes. As a consequence, you'll often see DLLs with a "createFoo" and a "deleteFoo" functions for creating and deleting Foo objects. The reason is that you can't free a pointer allocated from one DLL in a different DLL, since they can use different runtimes and thus different heaps. This is one of the sources of really fun bugs when writing for Windows :) .