31 #ifndef TBX_DEFERDELETE_H_ 32 #define TBX_DEFERDELETE_H_ 34 #include "application.h" 44 template<
class T>
class DeferDeleteCommand :
public Command
47 DeferDeleteCommand(T *obj) : _to_delete(obj) {}
49 static void Create(T *obj)
51 DeferDeleteCommand *ddc =
new DeferDeleteCommand(obj);
58 virtual void execute()
76 DeferDeleteCommand<T>::Create(obj);
A library for creating RISC OS toolbox applications.
Definition: abouttobeshownlistener.cc:34
void add_idle_command(Command *command)
Add a command to be run when no events are being received from the desktop.
Definition: application.cc:224
void remove_idle_command(Command *command)
Remove a command to be run when no events are being received from the desktop.
Definition: application.cc:235
void defer_delete(T *obj)
Function to defer the deletion of an object until the next idle (null) wimp poll. ...
Definition: deferdelete.h:74
Application * app()
Get the current application instance.
Definition: application.h:206