search for: gc_mark_sizerbelongingtowindow

Displaying 4 results from an estimated 4 matches for "gc_mark_sizerbelongingtowindow".

2007 Jul 20
0
[1123] trunk/wxruby2/swig/wx.i: Check sizers being marked have a ruby rep and are not internal Wx-only,
...;> // not those picked up as marked by in-scope variables by </span><span class="cx"> // Ruby. Otherwise, segfaults may result. Because Sizers are SWIG </span><span class="cx"> // directors, they must be preserved from GC. </span><del>-void GC_mark_SizerBelongingToWindow(wxSizer *wx_sizer) </del><ins>+void GC_mark_SizerBelongingToWindow(wxSizer *wx_sizer, VALUE rb_sizer) </ins><span class="cx"> { </span><span class="cx"> // First, mark this sizer </span><del>- rb_gc_mark( SWIG_RubyInstanceFor(wx...
2007 Jul 21
0
[1135] trunk/wxruby2/swig/mark_free_impl.i: Convert from DOS to Unix newlines
...ne as a standard mark routine because ONLY sizers -// that are known to belong to a still-alive window should be marked, -// not those picked up as marked by in-scope variables by -// Ruby. Otherwise, segfaults may result. Because Sizers are SWIG -// directors, they must be preserved from GC. -void GC_mark_SizerBelongingToWindow(wxSizer *wx_sizer, VALUE rb_sizer) -{ - // First, mark this sizer - rb_gc_mark( rb_sizer ); - - // Then loop over hte sizer''s content and mark each sub-sizer in turn - wxSizerItemList& children = wx_sizer->GetChildren(); - for ( wxwxSizerItemListNode *node = children.GetFirst...
2007 Jul 21
0
[1127] trunk/wxruby2: Move shared C++ GC functions into separate file included into wx.i
...ne as a standard mark routine because ONLY sizers +// that are known to belong to a still-alive window should be marked, +// not those picked up as marked by in-scope variables by +// Ruby. Otherwise, segfaults may result. Because Sizers are SWIG +// directors, they must be preserved from GC. +void GC_mark_SizerBelongingToWindow(wxSizer *wx_sizer, VALUE rb_sizer) +{ + // First, mark this sizer + rb_gc_mark( rb_sizer ); + + // Then loop over hte sizer''s content and mark each sub-sizer in turn + wxSizerItemList& children = wx_sizer->GetChildren(); + for ( wxwxSizerItemListNode *node = children.GetFirst...
2007 Jul 04
0
[1108] trunk/wxruby2/swig: Revised mem mgmt for Sizers to address more GC crashes in Sizers demo
...ne as a standard mark routine because ONLY sizers +// that are known to belong to a still-alive window should be marked, +// not those picked up as marked by in-scope variables by +// Ruby. Otherwise, segfaults may result. Because Sizers are SWIG +// directors, they must be preserved from GC. +void GC_mark_SizerBelongingToWindow(wxSizer *wx_sizer) +{ + // First, mark this sizer + rb_gc_mark( SWIG_RubyInstanceFor(wx_sizer) ); + + // Then loop over hte sizer''s content and mark each sub-sizer in turn + wxSizerItemList& children = wx_sizer->GetChildren(); + for ( wxwxSizerItemListNode *node = children.GetF...