Andre Heine wrote: > Hello all, > > respot I... > > I'm search the DeveloperGuide for lifetime and destructing of UNO Objects. > > I found some hints, but my knowledge about is not enough;-\ > > Some headers offers me the "dispose()" or another "dispose" methods... > > --- > com/sun/star/uno/XReference.hdl > com/sun/star/lang/XComponent.hdl > /include/cppuhelper/compbase_ex.hxx > /include/cppuhelper/propshlp.hxx > ---- > At this time I tried to dispose my XComponents and after disposing it the > XMultiComponentFactory... > > This works exactly one time;(
Yes, of course. Dead is dead. No zombies. :-) Objects should be disposed by its "owner". Most of the time this is the creator of them. But there are objects with a shared ownership and many of them can't be closed easily as it is impossible for all the owners to prepare for the destruction(*). That's where additional APIs come into play. Documents shouldn't be disposed, they should be closed using their css.util.XCloseable interface. Terminating the running OOo instance is done by accessing the css.frame.Desktop object and its terminate method. Ciao, Mathias (*) Honestly speaking, of course it would be possible to prepare for that (nothing should be impossible in software). It's just considered a big effort and so it doesn't happen. ;-) -- Mathias Bauer (mba) - Project Lead OpenOffice.org Writer OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't reply to "[EMAIL PROTECTED]". I use it for the OOo lists and only rarely read other mails sent to it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
