List Info

Thread: Bitmap memory leaks (Bug 251)?




Bitmap memory leaks (Bug 251)?
country flaguser name
United States
2007-05-01 10:53:40
I see that this problem was noted a while ago (http://rubyforge.org/tracker/index.php?func=detail&;aid=251&group_id=35&atid=218) but it seems not to have received much attention.  Any chance that it will be looked at anytime soon?  So far, I prefer wxRuby to Ruby/Tk because of that closer coupling with the native window manager.  However, the memory leak is just murdering me. 

Unfortunately, I cannot merely load and cache bitmaps easily as I am modifying them (drawing text on them) at run time.  While I could cache the unique bitmaps with the drawn text, it seemed more of a nuisance than it was worth.
 
Evan Light
IMs (all): sleight42
http://evan.tiggerpalace.com

Re: Bitmap memory leaks (Bug 251)?
country flaguser name
United States
2007-05-02 03:57:59
Evan Light wrote:
> I see that this problem was noted a while ago 
> (http://rubyforge.org/
tracker/index.php?func=detail&aid=251&group_id=35&am
p;atid=218 
> <http://rubyforge.
org/tracker/index.php?func=detail&aid=251&group_id=3
5&atid=218>) 
> but it seems not to have received much attention.
Don't know about the other devs, but I'd forgotten this bug
mentioned 
any specific issue rather than 'we should check for memory
leaks'.

Bugs related to over-eager SWIG/Ruby memory management have
had higher 
priority because they cause segfaults. SWIG/Ruby was pretty

underdeveloped when this bug was created, but features added
since 
should make it a lot easier to reclaim objects that have
fallen out of 
scope.
> Any chance that it will be looked at anytime soon?  
Yes. Thanks for the report. Since Bitmap is such a widely
used class 
that we should try and fix this specific one for the
upcoming 0.40 release.

Generally, please do file leaking classes as specific bugs,
ideally with 
code samples.
> Unfortunately, I cannot merely load and cache bitmaps
easily as I am 
> modifying them (drawing text on them) at run time. 
While I could 
> cache the unique bitmaps with the drawn text, it seemed
more of a 
> nuisance than it was worth.
wxRuby should definitely be doing the work, not you.

Are you using MemoryDC?

alex
_______________________________________________
wxruby-users mailing list
wxruby-usersrubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/wxruby-users

Re: Bitmap memory leaks (Bug 251)?
country flaguser name
United States
2007-05-02 16:02:41

On May 2, 2007, at 4:57 AM, Alex Fenton wrote:

wxRuby should definitely be doing the work, not you.



I certainly appreciate the ethic.

Are you using MemoryDC?


By way of using the DC provided by the yield call within Bitmap#new, yes.

Evan Light
IMs (all): sleight42
http://evan.tiggerpalace.com

Re: Bitmap memory leaks (Bug 251)?
country flaguser name
United States
2007-05-25 13:52:33
Confirmed that it is a memory leak with Bitmap or BitmapButton.  Now that I'm caching the buttons as I create them, no more leak.

Evan Light
IMs (all): sleight42


On May 2, 2007, at 4:57 AM, Alex Fenton wrote:

Evan Light wrote:
I see that this problem was noted a while ago 
but it seems not to have received much attention.
Don't know about the other devs, but I'd forgotten this bug mentioned 
any specific issue rather than 'we should check for memory leaks'.

Bugs related to over-eager SWIG/Ruby memory management have had higher 
priority because they cause segfaults. SWIG/Ruby was pretty 
underdeveloped when this bug was created, but features added since 
should make it a lot easier to reclaim objects that have fallen out of 
scope.
Any chance that it will be looked at anytime soon?  
Yes. Thanks for the report. Since Bitmap is such a widely used class 
that we should try and fix this specific one for the upcoming 0.40 release.

Generally, please do file leaking classes as specific bugs, ideally with 
code samples.
Unfortunately, I cannot merely load and cache bitmaps easily as I am 
modifying them (drawing text on them) at run time.  While I could 
cache the unique bitmaps with the drawn text, it seemed more of a 
nuisance than it was worth.
wxRuby should definitely be doing the work, not you.

Are you using MemoryDC?

alex
_______________________________________________
wxruby-users mailing list
wxruby-usersrubyforge.org">wxruby-usersrubyforge.org

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )