[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Libqtlua-list] patch for osx compile
From: |
Alexandre Becoulet |
Subject: |
Re: [Libqtlua-list] patch for osx compile |
Date: |
Thu, 02 May 2013 22:47:39 +0200 |
User-agent: |
KMail/4.10.1 (Linux/3.7.10-1-ARCH; KDE/4.10.1; x86_64; ; ) |
On Friday 03 May 2013 02:32:28 é«æä¿ wrote:
Hi,
> QT version 5.0.1 and 5.0.2 , OS: linux and osx
Thanks,
> run qtlua, and type os.exit()
> i got:
> qtlua: /home/gxj/pp/libqtlua/src/QtLua/qtluaref.hh:513:
> QtLua::Refobj<X>::~Refobj() [with X = QtLua::UserData]: Assertion
> `ref_count() == 0 || !"Can not destruct object with live references"'
> failed.
Both Qt and Lua provide functions which may not be appropriate depending on
the situation. The os.exit Lua function is not appropriate here because it
calls the libc exit function which doesn't unwind the stack. The cleanup of
various C++ objects is not performed properly in this case. Use app:quit()
instead. You may want to drop the os.exit function and other such lua
functions to prevent their use if it's critical in your application.
--
Alexandre