On Mon, 2011-01-31 at 13:46 +0200, ext Pertti Kellomäki wrote:
> We are implementing support for QtDeclarative based applications (i.e. 
> QML + C++ wrapper) in meegotouch-applauncherd. The idea is that a 
> QApplication and a QDeclarativeView are instantiated in a cache before 
> application launch, and the application's main() picks the instances 
> from the cache.
> 
> There has been some discussion regarding the ownership of the 
> QApplication and QDeclarativeView instances. Because of the design, the 
> instances cannot be created in the stack, and consequently the automatic 
> destruction at end of scope does not take place. I would appreciate 
> insight into what happens in a Linux+X11 setup, specifically:
> 
> 1) What happens if the application simply exits without explicitly 
> calling delete on the instances? Is there a possibility of leaking some 
> external resources e.g. in the X server?
> 
> 2) What happens if the application crashes? Is there a possibility of 
> leaking something?

No leaks in X server side in both situations. No memory and file
descriptors are leaked also in client side, since the kernel takes care
of cleaning up them for you. Temporary files created by the client
application are going to "leak" in case of a crash or if they are not
explicitly removed during shutdown.

_______________________________________________
Qt-components mailing list
Qt-components@qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-components

Reply via email to