Displaying 11 results from an estimated 11 matches for "gc_manage_as_object".
2007 Jul 04
0
[1108] trunk/wxruby2/swig: Revised mem mgmt for Sizers to address more GC crashes in Sizers demo
...t;<span class="lines">@@ -4,14 +4,12 @@
</span><span class="cx"> %include "../common.i"
</span><span class="cx">
</span><span class="cx"> %module(directors="1") wxBoxSizer
</span><del>-GC_MANAGE_AS_OBJECT(wxBoxSizer);
</del><ins>+GC_MANAGE_AS_SIZER(wxBoxSizer);
</ins><span class="cx">
</span><span class="cx">
</span><del>-// shared functions for GC marking
</del><ins>+// shared functions
</ins><span class=&qu...
2007 May 28
0
[1033] trunk/wxruby2/swig: GC fixes for nested sizers; fix crashes in html.rb demo
...mp;nbsp      2007-05-28 19:17:14 UTC (rev 1033)
</span><span class="lines">@@ -6,6 +6,12 @@
</span><span class="cx"> %module(directors="1") wxBoxSizer
</span><span class="cx"> GC_MANAGE_AS_OBJECT(wxBoxSizer);
</span><span class="cx">
</span><ins>+
+// shared functions for GC marking
+%include "../shared/sizers.i"
+%markfunc wxBoxSizer "mark_wxSizer";
+
+
</ins><span class="cx"> %import "include/wxObject.h&quo...
2007 Jul 23
11
Memory problem with GridCell*Editor
Alex,
I was getting the following crashes when editing cells in a grid:
./init.rb:1072:in `main_loop'': undefined method `begin_edit'' for
"_p_wxEvent":String (NoMethodError)
from ./init.rb:1072
but only after the first App GC mark phase.
So I changed all the GridCell*Editor.i files from GC_MANAGE to
GC_MANAGE_AS_EVENT. Which stopped the crashing. My question
2007 Jul 21
0
[1131] trunk/wxruby2/swig/classes/TaskBarIcon.i: TaskBarIcon should never be destroyed by Ruby, else will segfault-on-exit
...;<span class="lines">@@ -4,7 +4,7 @@
</span><span class="cx"> %include "../common.i"
</span><span class="cx">
</span><span class="cx"> %module(directors="1") wxTaskBarIcon
</span><del>-GC_MANAGE_AS_OBJECT(wxTaskBarIcon);
</del><ins>+GC_NEVER(wxTaskBarIcon); // Shouldn''t be deleted from within Ruby
</ins><span class="cx">
</span><span class="cx"> %{
</span><span class="cx"> #include <wx/taskbar.h>
</span&...
2007 Jun 26
0
[1084] trunk/wxruby2/swig/classes/SystemSettings.i: Fix missing punctuation in SystemSettings typemaps
...tings.i        2007-06-26 18:41:20 UTC (rev 1084)
</span><span class="lines">@@ -6,12 +6,12 @@
</span><span class="cx"> %module wxSystemSettings
</span><span class="cx"> GC_MANAGE_AS_OBJECT(wxSystemSettings);
</span><span class="cx">
</span><del>-%typemap(in) wxSystemColour "$1 = (wxSystemColour)NUM2INT($input)";
-%typemap(out) wxSystemColour " $result = INT2NUM((int)$1)";
-%typemap(in) wxSystemFont "$1 = (wxSystemFont)NUM2IN...
2007 Jun 23
0
[1061] trunk/wxruby2/swig/classes/EvtHandler.i: Remove a lot of no longer needed includes from EvtHandler.i
...clude <wx/sashwin.h>
-#include <wx/wizard.h>
-#include <wx/aui/aui.h>
-#ifdef WXSCINTILLA
-# include <wx/wxscintilla.h>
-#endif
-%}
-
</del><span class="cx"> %module(directors="1") wxEvtHandler
</span><span class="cx"> GC_MANAGE_AS_OBJECT(wxEvtHandler);
</span><span class="cx">
</span><span class="lines">@@ -32,7 +13,6 @@
</span><span class="cx">
</span><span class="cx"> %include "include/wxEvtHandler.h"
</span><span class=&q...
2007 Jul 21
0
[1130] trunk/wxruby2/swig/classes/Caret.i: Make Caret managed as object, so it is cleaned up properly when not
...;<span class="cx">
</span><span class="cx"> %module(directors="1") wxCaret
</span><del>-GC_MANAGE(wxCaret);
-%ignore wxCaret::wxCaret() ;
-%ignore wxCaret::wxCaret(wxWindow* window , int width , int height ) ;
</del><ins>+GC_MANAGE_AS_OBJECT(wxCaret);
</ins><span class="cx">
</span><ins>+%ignore wxCaret::wxCaret() ;
+%ignore wxCaret::wxCaret(wxWindow* window, int width, int height);
+
</ins><span class="cx"> // only support the variants that return an object
</span><del&...
2007 Jun 26
0
[1080] trunk/wxruby2/swig: Moved typemaps specific to SystemSetting out of general typemap file
...ttings.i        2007-06-26 17:54:51 UTC (rev 1080)
</span><span class="lines">@@ -6,6 +6,13 @@
</span><span class="cx"> %module wxSystemSettings
</span><span class="cx"> GC_MANAGE_AS_OBJECT(wxSystemSettings);
</span><span class="cx">
</span><ins>+%typemap(in) wxSystemColour "$1 = (wxSystemColour)NUM2INT($input)";
+%typemap(out) wxSystemColour " $result = INT2NUM((int)$1)";
+%typemap(in) wxSystemFont "$1 = (wxSystemFont)NUM2IN...
2007 May 22
0
[1029] trunk/wxruby2/swig/classes/MenuBar.i: Add special GC protection for Wx::Menu to prevent premature destruction
...gt;<span class="lines">@@ -4,12 +4,37 @@
</span><span class="cx"> %include "../common.i"
</span><span class="cx">
</span><span class="cx"> %module(directors="1") wxMenuBar
</span><del>-GC_MANAGE_AS_OBJECT(wxMenuBar);
</del><ins>+GC_MANAGE_AS_WINDOW(wxMenuBar);
</ins><span class="cx">
</span><del>-%ignore wxMenuBar(int n , wxMenu* menus[] , const wxString titles[] ) ;
</del><ins>+%ignore wxMenuBar(int n , wxMenu* menus[] , const wxStr...
2007 May 21
0
[1024] trunk/wxruby2/swig: Memory mgmt: defs and implementation of new memory management; strip
...when handling is complete, shouldn''t
+// be stored so not tracked.
+%define GC_MANAGE_AS_EVENT(kls)
+%feature("freefunc") kls "GcNullFreeFunc";
+%enddef
+
+// Other descendants of Wx::Object - eg Colour, Pen, Bitmap - that Wx
+// manages by reference counting
+%define GC_MANAGE_AS_OBJECT(kls)
+%trackobjects;
+%enddef
+
+// All other classes - mainly helper classes (eg Sizer, GridCellxxx) and
+// informational classes eg Point, Size, Rect. These are tracked but
+// sometimes later disowned once passed into a widget, and thenceforth
+// managed by WxWidgets
+%define GC_MANAGE(kls)...
2007 Jun 28
0
[1095] trunk/wxruby2: Remove useless methods from Wx::Object and add wx_class method for info; document
...       2007-06-28 18:42:03 UTC (rev 1095)
</span><span class="lines">@@ -6,7 +6,26 @@
</span><span class="cx"> %module(directors="1") wxObject
</span><span class="cx"> GC_MANAGE_AS_OBJECT(wxObject);
</span><span class="cx">
</span><ins>+// These methods are useless, and possibly dangerous if called from Ruby
</ins><span class="cx"> %ignore wxObject(wxObject const &other);
</span><span class="cx"> %ign...