[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Anybody had problems with memleak with tolua (for lua 4)
- From: Jardar Johannes Maatje <maatje@...>
- Date: Sun, 24 Aug 2003 12:52:05 +0200 (CEST)
I'm heaving problems with tolua when returning objects by value instead of
reference in tolua.
An example of the C/tolua class that I have, and that I want to be able
to use in lua:
class GamePos2d{
public:
GamePos2d(float x, float y);
~GamePos2d();
GamePos2d normalized();
}
When calling the normalized method in lua a new GamePos2d will be created
since it is copied by value, but it is never destroyed so a memleak will
occure.
Am I doing something wrong or is this a bug in tolua?
Note that I am using lua 4.0 and thus tolua 4.0 too.
Jardar