[luabind] Protecting memory
Brought to you by:
arvidn,
daniel_wallin
From: Colin G. / c. <con...@gm...> - 2011-11-30 11:39:51
|
Hi, I'm new to this mailing list and quite new to luabind too. I'm creating a 2D game engine with lua scripting and I wich to protect the memory (against segmentation faults). Some of my functions return pointers to objects, and these objects can be deleted later by the engine. When the user uses a pointer, I would like to check if this pointer is still valid before using it in my C++ code. I can easily do that if the pointer in a function argument but I don't know how to that when the user use the member of the object. What is the good way to do it with luabind ? Thanks in advance ! |