Page 1 of 1

SIGSEGV. How to react on event with sender destruction.

Posted: Wed Apr 15, 2009 4:47 pm
by EzPresso
The problem is:
Object1 sends event using ProcessEvent() method;
Object2 handles the event and should delete Object1 instantly.
How to implement it? I'm trying to avoid delayed destruction schemes (callbacks, etc.).

Language is c++.

Posted: Thu Apr 16, 2009 6:58 am
by van_user
Does Object1 has Destory( ) method?

Posted: Thu Apr 16, 2009 7:59 pm
by EzPresso
van_user wrote:Does Object1 has Destory( ) method?
In fact, no.

Posted: Fri Apr 17, 2009 6:31 am
by van_user
I don`t see any suitable method to do this.

Code: Select all

	A a;
	A* a_pointer = &a;
	delete a_pointer;
- don`t work.
If you have sources there are some variants. ( named constructors, some other).