SIGSEGV. How to react on event with sender destruction.

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
EzPresso
In need of some credit
In need of some credit
Posts: 8
Joined: Tue Aug 26, 2008 7:45 am
Contact:

SIGSEGV. How to react on event with sender destruction.

Post by EzPresso » Wed Apr 15, 2009 4:47 pm

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++.
### EzPresso.ru - Daylighting Simulation Software Development ###
Ubuntu 9.04 / Windows XP Pro
GNUC / MinGW / wxWidgets 2.9.1

van_user
Experienced Solver
Experienced Solver
Posts: 55
Joined: Wed Jun 11, 2008 9:28 pm
Location: UA

Post by van_user » Thu Apr 16, 2009 6:58 am

Does Object1 has Destory( ) method?

EzPresso
In need of some credit
In need of some credit
Posts: 8
Joined: Tue Aug 26, 2008 7:45 am
Contact:

Post by EzPresso » Thu Apr 16, 2009 7:59 pm

van_user wrote:Does Object1 has Destory( ) method?
In fact, no.
### EzPresso.ru - Daylighting Simulation Software Development ###
Ubuntu 9.04 / Windows XP Pro
GNUC / MinGW / wxWidgets 2.9.1

van_user
Experienced Solver
Experienced Solver
Posts: 55
Joined: Wed Jun 11, 2008 9:28 pm
Location: UA

Post by van_user » Fri Apr 17, 2009 6:31 am

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).
Win XP (SP0), mingw, wx 2.9.0

Post Reply