Hi Carsten,

Ok....but, as a routine, do you know if is Imlib_paste_image() leaky or not?

Getting a definite yes or no on that question would save me alot of debug
time.

For now, rewriting Pogo to handle Imlib2 is sorta out of the question..It
wouldnt make much sense for me to drop everything and do a complete re-write
until I knew there was something truly "getting in the way" of doing it with
Imlib1. Finding out theres a significant memory leak in Imlib_paste_image()
would be just such a roadblock, since my code hits that routine several
thousand times over the course of several hours. The resulting leak is
enormous.

I know you don't particularly want to discuss (and therefore, endorse)
Imlib1, and I realize its a basic tenet of open source software to say
"Don't bother, just upgrade to this other version instead"... :) But my
hands are tied here.

So, again.......Structurally, do you see anything wrong with the code? (i.e.
am I forgetting to free something?  For example, is there a function in
Imlib which is normally called after Imlib_paste_image()? )




> > // (Note: "buffer" and "bufferData" are analogous to "im" and "id" in
> > your examples, respectively... and "icon[0].image" is analogous to
"im".)
> >
> > void strobeThisIcon(int uniqueID, int strobeCycles)
> > {
> >         int originalBrightness;
> >
> >         buffer=icon[0].image;
> >         Imlib_get_image_modifier(bufferData,buffer,&mod);
> >         originalBrightness=mod.brightness;
> >
> >         while(strobeCycles!=0)
> >         {
> >                         while(mod.brightness<320)
> >                         {
> >
> > Imlib_set_image_modifier(bufferData,buffer,&mod);
> >
> >  Imlib_paste_image(bufferData,buffer,win,0,0,64,64);
> >                                 mod.brightness=mod.brightness+25;
> >                         }
> >
> >
> >                         while(mod.brightness>=originalBrightness)
> >                         {
> >
> > Imlib_set_image_modifier(bufferData,buffer,&mod);
> >
> > Imlib_paste_image(bufferData,buffer,win,0,0,64,64);
> >                                 mod.brightness=mod.brightness-25;
> >                         }
> >
> >                         strobeCycles--;
> >         }
> >
> >         XSync(disp,False);
> >
> > }
> >
> >
> > PS.. If you want to see the leak in action, grab the latest Pogo:
> >
> > http://www.ibiblio.org/propaganda/pogo/pogo-2.1.tar.gz
> >
> > ...and hardwire main() to just hit strobeThisIcon() in an infinite loop.
> >
> > Build it, and have a look at it in memprof. Leak city.
> >
> > Cheers,
> > Bowie
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:ThinkGeek
> > Welcome to geek heaven.
> > http://thinkgeek.com/sf
> > _______________________________________________
> > enlightenment-devel mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
>
> -- 
> --------------- Codito, ergo sum - "I code, therefore I
am" --------------------
> The Rasterman (Carsten Haitzler)    [EMAIL PROTECTED]
> 熊耳 - 車君                         [EMAIL PROTECTED]
> Mobile Phone: +61 (0)413 451 899    Home Phone: 02 9698 8615
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> enlightenment-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
enlightenment-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to