The following two patches (theoretically) tell Ruby that it no longer owns menu items after they have been attached to a frame. We''ll need several more of these DISOWN typemaps as we get further into this. _______________________________________________ wxruby-users mailing list wxruby-users@rubyforge.org http://rubyforge.org/mailman/listinfo/wxruby-users
Kevin Smith
2006-Apr-29 21:44 UTC
[Wxruby-users] MenuBar DISOWN (was: Patches for some object tracking)
On Sun, 2006-04-23 at 13:37 -0400, Roy Sutton wrote:> The following two patches (theoretically) tell Ruby that it no longer > owns menu items after they have been attached to a frame. We''ll need > several more of these DISOWN typemaps as we get further into this.I don''t really understand what these are doing, but they have been committed. Kevin
Kevin Smith wrote:> On Sun, 2006-04-23 at 13:37 -0400, Roy Sutton wrote: > >> The following two patches (theoretically) tell Ruby that it no longer >> owns menu items after they have been attached to a frame. We''ll need >> several more of these DISOWN typemaps as we get further into this. >> > > I don''t really understand what these are doing, but they have been > committed.It''ll be important to understand what this does as we move forwards. DISOWN tells SWIG that the underlying object we just sent to C++ no longer belongs to us and we shouldn''t free it (say, when the object goes out of scope). Any function that takes an object that will no longer be freed by the calling program should be marked with DISOWN. This is in contrast to items that wx uses but never frees or uses by making copies of when it gets it. Roy P.S. That''s my understanding anyway. I could be completely wrong. :)