On Thu, Mar 6, 2008 at 9:28 PM, John Labenski <[EMAIL PROTECTED]> wrote: > I found that if you do this it works, but there's obviously something > wrong that needs to be fixed. > > rend = wx.wxGridCellBoolRenderer(...) -- same for wxGridCellXXXEditor > rend:IncRef() > rend:IncRef() > grid:SetCellRenderer(1,2,rend) >
I don't actually use setCellRenderer, but the same thing happens with wxGridCellAttr and SetRenderer / SetEditor. I have now added IncRef to wxadv_bind.cpp for these two functions. I think this suits the wxWidgets documentation which says that the GridCellAttr takes the object ownership when these functions are called (well at least it says this for SetRenderer) I got rid of the previous crash, but still there is something causing memory corruption according to the "free"-function with debugging builds. My code calls Lua incremental GC during execution, so I guess I maybe more sensitive for these, but this is of course good so that the bugs don't stay hidden. Eero ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users