[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: ToLua - 24 byte mem leak.. suggestions?
- From: Waldemar Celes <celes@...>
- Date: Thu, 20 Jun 2002 09:56:50 -0300
I'm investigating it. I will keep you informed ...
At 19:21 19/6/2002 -0700, you wrote:
I've made some progress on the problem. The leak goes away if i comment out
the following line in the tolua binding file.
My simple script will continue to work, but the more complex ones in the
full system won't. Is this a bug with cleaning up the user defined
types/classes in tolua?
Date: Tue, 18 Jun 2002 18:43:21 -0700
From: "Thomas Tong" <firstname.lastname@example.org>
Subject: ToLua - 24 byte mem leak.. suggestions?
I'm getting a 24 byte memory leak in my application everytime i call a C++
function that returns a user defined class in LUA. This bug has been
plauging our application for months, and these 24 byte sized leaks are
getting out of hand. :) I havn't been able to figure it out. Any help would
be greatly appreciated.
A very simple test case application in Visual C++ 6.0 is here showing it
occuring using a basic class. The following is a link to it, you may need to
cut and paste it into your browser.
I have a C++ singleton class that returns a pointer to itself. The following
is the defination i have in the test case.
static exportTest* p();
In lua i called the function in the following way.
pointer = exportTest:p();
The code works fine execept i get a 24 byte leak every time when calling
"exportTest:p()" even if i don't keep a copy of the pointer. This only
happens once no matter how many times i call that function. The problem is I
get a the leak for once for every unique class binding. Any sugestions of
how i can track down this problem would be fantastic.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/