On 6/20/06, Steve Kieu <[EMAIL PROTECTED]> wrote:
>
>> 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?
>
> Actually the reason is a bit  complex. First I can crash it without any db
> operation at all just open dialog and close it many times ; it crashed in
> win2k and win98 with 16Mb of ram. Then I added Destroy() method and call it.
> Now win98 is fine but still not win2k.

I've checked in a "fix" for wxLua's GC routine that hopefully will
work a little better for some things. It won't solve the dialog
problem since it seems that you need about 4000 items for the GC to
run using it's default settings, but if you run this in lua at the top
of your program it drops the number of items to 9, of course you get a
penalty of running the GC more often. The lua docs for collectgarbage
are not really clear to me so I just played around with the values.

collectgarbage("setpause", 10)

In any case just remember to always Destroy windows, colours, pens,
brushes, bitmaps, basicly any GDI object since MSWindows can only have
a limited number of them.

> Compile luasql in win32 is really pain to me and I am a bit impatient for
> this kind of job. I do not that add luasql files to existing project is
> easier and no promise that the stability improves. On the other hand, bind
> wxSqlite to wxLua is quite easy and it works stable now.  For another db
> type I can use wxODBC but unfortunately wxODBC not bind to wxLua yet  :-)

Contributions are welcome. :)

> I am quite happy to find that the problem is not actually wxLua or wxWidget
> but a third party packages, so I do not have to re-design and switch to
> another technology. wxLua rocks!

I'm glad you managed to get it to work, at least in some way.

Regards,
    John Labenski


_______________________________________________
Wxlua-users mailing list
Wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to