On Fri, Mar 7, 2008 at 6:45 PM, John Labenski <[EMAIL PROTECTED]> wrote:
> After looking into it a little more, I think the best solution is to > use the %ungc tag in the interface file so that we have: > wxGrid::SetCellEditor(int row, int col, %ungc wxGridCellEditor *editor) > This means that Lua will not try to delete the editor and it's up to > the wxGrid (actually wxGridCellAttr) to delete it by calling DecRef(). This sounds correct to me (based on wxwidgets code) > You can retrieve it using : > wxGridCellEditor* GetCellEditor(int row, int col) > and the returned wxGridCellEditor will not be garbage collected by Lua. > Here I disagree, It looks to me that GetCellEditor does do a IncRef before returning the editor pointer, so I think that wxLua should DecRef it when it is done. ------------------------------------------------------------------------- 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