laysovann
December 22nd, 2005, 11:24 PM
Hello ! :)
I have a problem in my solution which use extensively STL.
When we remove pointer from list<> in A.dll to B.dll [OK]
When we put back from B.dll to A.dll [ACCESS VIOLATION]
We have : prim.dll, env.dll and app.exe (multithread)
[prim.dll] Shape* newLine();
[app.exe] list<Shape*> obj;
[env.dll] list<Shape*> undo;
The senario :
[create line] Shape* line=newLine(); obj.push_back(line);
[delete line] obj.remove(line); undo.push_back(line);
[undo delete] obj.push_back(undo.front());
[problem ] obj.front()=0xfeeefeee
Object was never delete until now, but we got an invalid pointer. Your idea and comments would be very helpful.
Thanks. :)
I have a problem in my solution which use extensively STL.
When we remove pointer from list<> in A.dll to B.dll [OK]
When we put back from B.dll to A.dll [ACCESS VIOLATION]
We have : prim.dll, env.dll and app.exe (multithread)
[prim.dll] Shape* newLine();
[app.exe] list<Shape*> obj;
[env.dll] list<Shape*> undo;
The senario :
[create line] Shape* line=newLine(); obj.push_back(line);
[delete line] obj.remove(line); undo.push_back(line);
[undo delete] obj.push_back(undo.front());
[problem ] obj.front()=0xfeeefeee
Object was never delete until now, but we got an invalid pointer. Your idea and comments would be very helpful.
Thanks. :)