different threads cant delete eachother's variables ?

Started by
9 comments, last by pcxmac 18 years ago
the destructor for the link class is empty, nothing is in it.
Node has a virtual destructor but its not being called, cause I can trace the path in my debugger. Its weird, I need to think about my "queing another thread" procedure / concept. Sorry if I frustrated anyone, both threads could read from the variable, I suspect that the cause is that one thread cant delete an allocated variable created by another. (It could just be metrowerks though)

I just created the same class in the main thread as was created in another thread, when I deleted the main thread (in the main thread) class it deleted with out troubles, however, when I tried to delete the other thread's instantiated class, it crumped.

	DXDevice*		myDevice = (DXDevice*)mindy.last->last->socket; // derived from class which is threaded - aka mindy		DXDevice*		thisDevice = new DXDevice; // same kind of class		delete (DXDevice*)thisDevice;  // works with out hitch	delete (DXDevice*)myDevice;    // crumps after completing 99% of destructor, locks up in assembly.
sig

This topic is closed to new replies.

Advertisement