i have a dll that exports a class - it uses an abstract base class with pure virtual functions(defined in a header file), then a function to export it that returns a new object. insided the class is a 'release' function that deletes the object. now in another dll of mine, i dont do anything with the deconstructor, but in this one for some reason i have to have the same 'delete this' as i do in the release function or it crashes. now in the host application is where i get some sort of problem. note - it runs/finishes without error but some code isnt being exectued or something.

typedef IMyObj* (*PFNCreate)();
//main
char dllName[] = "dllname.dll";
HMODULE hmod = LoadLibrary(dllName);
if (!hmod)
{
cout << "error loading dll" << endl;
return 0;
}
PFNCreate pfnCreate = (PFNCreate)GetProcAddress(hmod, \
TEXT("CreateObject"));
IMyObject* obj = (pfnCreate)();
obj->function1();
//some code
cout << "??" << endl; //i get this outputted
obj->release();
delete obj;
FreeLibrary(hmod);
cout << "??"; //######## THIS DOESNT GET PRINTED
return 0;

thank you in advance, if more code is necessary to see what is going on let me know and ill post it.