OXF::end() is the Framework API-Call -
in the windows adapter this function is implented with
exit() 
...
Please note .. it's your responsible clean/destroy other existing objects upfront - so you have other objecst ? probably that's your problem. But do not use obj->destroy on objects with stacharts - It's possible that there are some events on its way. --> This would be the same as stoping and removing a running motor from a driving car

(by Skywalker)
Further refeerences Properties: setSupportDirectDeletion