On 6/20/06, Steve Kieu <[EMAIL PROTECTED]> wrote: > > I believe it is a problem with the garbage collector of 5.1. I cannot > seem to find a way to force it to do a GC on "dead" locals. For > example > I think it is the problem with wxWidget. The similar test but in purely > wxWidgets show the same symptoms, and the symtom goes away if I do : > > Call Destroy() explicitely Or manually delete the pointer (no good) > This helps to solve the bug with memory for me. > > According to wxWidgets docs, it seems no need to call Destroy() after the > modal dialog has closed but it seems not right. Suppose for some other > widgets as well.
Thankfully it doesn't destroy the dialog after ShowModal() since for many dialogs thats when you get the values that the user had entered, eg. the file dialog. > I have added to my copy of wxlua 2.6.2 method Destroy for wx.wxDialog, and > noticed that it has not been added to the snapshot 2006-06-15, so I thought > we should add Destroy() to the bindings as well as wxPanel, wxFrame (top > windows level object) They all already have it through the wxWindow base class. > with lua50 in 2.6.2 I have test the gc and it seems to work fine. Have a > win98 run in vmware with only 16Mb ram and unable to crash it. Have not > tested with lua5.1 though. That's interesting, but since the GC in lua completely changed from 50 to 51, probably not too helpful. I guess we'll have to find a way to force 51 to be a little more aggressive. > Stiil my apps unstable esp in win2k and a strange combination; use wxLua and > luasql from kepler project; and even with luasqlite3. It runs for a while > and crash if I do db operations. just a simple write and show the form > several times enough to crash it (in win2k pro). I have done many test > narrowing down the cause without much success. Just several mins ago I bind > wxsqlite3 to wxLua and use it instead of luasql and things seems to be fine. > Will test it more to confirm. Now I will have to rewrite the whole database > layer using wxsqlite3 instead. To be independent of luasql I can use the > latest wxlua which is also a good thing . Well, this points to luasql as being the culprit. What if you just add the luasql files directly to your project instead of compiling it as a separate lib? Regards, John Labenski _______________________________________________ Wxlua-users mailing list Wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users