search for: gcnullfreefunc

Displaying 5 results from an estimated 5 matches for "gcnullfreefunc".

2007 May 21
0
[1024] trunk/wxruby2/swig: Memory mgmt: defs and implementation of new memory management; strip
...// alive. [see App.i] +// +// 2) Almost all other classes are memory managed by wxRuby - that is, when +// they have fallen out of scope and GC is run, the underlying C++ object +// will be deleted too by the standard %freefunc. + + +// This is implemented in swig/wx.i +%{ +extern void GcNullFreeFunc(void *); +%} + +// Macro definitions. + +// Objects that are tracked but managed by WxWidgets - this is currently +// all Windows, including Frames and Dialogs +%define GC_NEVER(kls) +%trackobjects; +%feature("freefunc") kls "GcNullFreeFunc"; +%enddef + +// Strategy for windows...
2007 May 22
0
[1032] trunk/wxruby2/swig: Preserve Sizers associated with Windows from GC; fix several sample
...p;nbsp2007-05-22 21:40:09 UTC (rev 1032) </span><span class="lines">@@ -22,6 +22,7 @@ </span><span class="cx"> // This is implemented in swig/wx.i </span><span class="cx"> %{ </span><span class="cx"> extern void GcNullFreeFunc(void *); </span><ins>+extern void GC_mark_wxWindow(void *); </ins><span class="cx"> %} </span><span class="cx"> </span><span class="cx"> // Macro definitions. </span><span class="lines">@@ -33,27 +3...
2007 Jul 21
0
[1135] trunk/wxruby2/swig/mark_free_impl.i: Convert from DOS to Unix newlines
...- -%{ -static VALUE wx_destroyed_sym = rb_intern("@__wx_destroyed__"); - -// Code to be run when the ruby object is swept by GC - this only -// unlinks the C++ object from the ruby VALUE but doesn''t delete -// it because it is still needed and will be managed by WxWidgets. -void GcNullFreeFunc(void *ptr) -{ - SWIG_RubyRemoveTracking(ptr); -} - -// Tests if the window has been signalled as destroyed by a -// WindowDestroyEvent handled by wxRubyApp -bool GC_IsWindowDeleted(void *ptr) -{ - // If objects have been ''unlinked'' then DATA_PTR = 0 - if ( ! ptr ) return true;...
2007 Jul 21
0
[1127] trunk/wxruby2: Move shared C++ GC functions into separate file included into wx.i
...+ +%{ +static VALUE wx_destroyed_sym = rb_intern("@__wx_destroyed__"); + +// Code to be run when the ruby object is swept by GC - this only +// unlinks the C++ object from the ruby VALUE but doesn''t delete +// it because it is still needed and will be managed by WxWidgets. +void GcNullFreeFunc(void *ptr) +{ + SWIG_RubyRemoveTracking(ptr); +} + +// Tests if the window has been signalled as destroyed by a +// WindowDestroyEvent handled by wxRubyApp +bool GC_IsWindowDeleted(void *ptr) +{ + VALUE rb_win = SWIG_RubyInstanceFor(ptr); + if ( rb_ivar_defined(rb_win, wx_destroyed_sym ) ) +&amp...
2007 Jul 05
0
[1109] trunk/wxruby2/swig: Move marking of MenuBar from direct %markfunc to via mark_wxFrame, so
...span class="cx"> </span><del>-// This is implemented in swig/wx.i </del><ins>+// These are implemented in swig/wx.i, so they are shared among all classes </ins><span class="cx"> %{ </span><span class="cx"> extern void GcNullFreeFunc(void *); </span><span class="cx"> extern void GC_mark_wxWindow(void *); </span><ins>+extern void GC_mark_wxFrame(void *); </ins><span class="cx"> %} </span><span class="cx"> </span><span class="cx">...