Displaying 10 results from an estimated 10 matches for "freefunc".
Did you mean:
free_func
2007 May 21
0
[1024] trunk/wxruby2/swig: Memory mgmt: defs and implementation of new memory management; strip
...an><span class="cx"> #endif
</span><span class="cx">
</span><del>-extern void GcMarkDeleted(void *);
-extern bool GcIsDeleted(void *);
-extern void GcMapPtrToValue(void *ptr, VALUE val);
-extern VALUE GcGetValueFromPtr(void *ptr);
-extern void GcFreefunc(void *);
-
</del><span class="cx"> extern VALUE mWxruby2;
</span><span class="cx"> %}
</span><span class="cx">
</span><span class="cx"> %include "typedefs.i"
</span><span class="cx"...
2007 May 03
1
memory leaks
...means that every
Wx::Bitmap (for example, and others) are always marked in ruby''s GC mark
phase, so they are never collected until shut down, even if they have
fallen out of scope everywhere else.
I think the way to go is to dispense with fixdeleting altogether and
define appropriate freefuncs for the different types of Wx classes
(Windows, TopLevelWindows, Events, others) that reflect wxWidgets own
memory management tactics. But this uncovers quite a few bugs that have
so far been masked, so I think we should try after releasing 0.0.40
alex
2007 May 22
0
[1032] trunk/wxruby2/swig: Preserve Sizers associated with Windows from GC; fix several sample
...2007-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...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Do not allow break to break across function calls
...uncline = func->n.ndefun.linno;
+ loopnest = 0;
INTON;
shellparam.nparam = argc - 1;
shellparam.p = argv + 1;
@@ -950,6 +953,7 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags)
poplocalvars(0);
funcdone:
INTOFF;
+ loopnest = saveloopnest;
funcline = savefuncline;
freefunc(func);
freeparam(&shellparam);
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Do not allow break to break across function calls
...uncline = func->n.ndefun.linno;
+ loopnest = 0;
INTON;
shellparam.nparam = argc - 1;
shellparam.p = argv + 1;
@@ -950,6 +953,7 @@ evalfun(struct funcnode *func, int argc, char **argv, int flags)
poplocalvars(0);
funcdone:
INTOFF;
+ loopnest = saveloopnest;
funcline = savefuncline;
freefunc(func);
freeparam(&shellparam);
2006 Nov 03
3
revised get_client_data patch
...eing notified of its destruction at the right time, so I tagged the
ruby object that it now pointed to nothing, and then checked the ruby
object, which still hangs about, at exit cleanup.
I''m not sure whether this is a wxWidgets oddity, or whether it''s because
SWIG''s %freefunc doesn''t play well with directors yet. Either way, it
may (or may not) illuminate some of the other random crashers on other
platforms.
alex
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: choice_client_data.patch
Url: http://rubyfor...
2007 Jul 21
0
[1129] trunk/wxruby2/swig/classes/Window.i: Add DISOWN typemap for ToolTip so it isn''t double-deleted
...;/span><del>-// Caret set by set_caret becomes owned by C++
-%apply SWIGTYPE *DISOWN {wxCaret* caret};
</del><ins>+// Any of these following kind of objects become owned by the window
+// when passed into Wx, and so will be deleted automatically; using
+// DISOWN resets their %freefunc to avoid deleting the object twice
+%apply SWIGTYPE *DISOWN {wxCaret* caret};
+%apply SWIGTYPE *DISOWN {wxSizer* sizer};
+%apply SWIGTYPE *DISOWN {wxToolTip* tip};
</ins><span class="cx">
</span><del>-// Any sizers passed in to wx become owned by C++
-%apply SWIGT...
2007 Jul 05
0
[1109] trunk/wxruby2/swig: Move marking of MenuBar from direct %markfunc to via mark_wxFrame, so
...k/wxruby2/swig/memory_management.i        2007-07-05 18:45:10 UTC (rev 1109)
</span><span class="lines">@@ -19,10 +19,11 @@
</span><span class="cx"> // will be deleted too by the standard %freefunc.
</span><span class="cx">
</span><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"...
2004 May 02
6
Progress on wxruby-swig segfaults
It has been a frustrating couple days. I have been tracking down the bug
where any wxruby-swig app will crash/segfault upon exit. Yesterday, I
fixed the problem where the App object was being freed twice.
Today, after several hours of debugging, I discovered that the Frame
object is also being deleted twice (for a different reason). I have
asked Lyle Johnson for some guidance, because it is
2007 Jul 04
0
[1108] trunk/wxruby2/swig: Revised mem mgmt for Sizers to address more GC crashes in Sizers demo
...ass="cx"> %enddef
</span><span class="cx">
</span><ins>+// Sizers attached to windows are automatically destroyed by wxWidgets,
+// so they should not be deleted.
+//
+// TODO - orphaned/unattached sizers are not automatically destroyed -
+// so the freefunc should check for this condition and do the delete if
+// required to prevent a memory leak.
+%define GC_MANAGE_AS_SIZER(kls)
+GC_NEVER(kls);
+%enddef
+
</ins><span class="cx"> // All other classes - mainly helper classes (eg Sizer, GridCellxxx) and
</span><span class=...