[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] fl_set_xyplot_alphaxtics and memory allocation

From: alessandro basili
Subject: Re: [XForms] fl_set_xyplot_alphaxtics and memory allocation
Date: Wed, 28 Sep 2011 22:15:03 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:7.0) Gecko/20110922 Thunderbird/7.0

On 9/28/2011 9:57 PM, Jens Thoms Toerring wrote:
> Hi Al,
> On Wed, Sep 28, 2011 at 08:26:54PM +0200, alessandro basili wrote:
>> Unfortunately we noticed that every time we call the function there's a
>> memory allocation (performed by fl_strdup) even if the memory has
>> already been allocated.
>> This behavior causes an increase of the memory usage which affects the
>> long term usage of the application.
>> To overcome this problem we used the following trick:
>> fl_set_xyplot_xtics();        //deallocates axtic with free_atic
>> fl_set_xyplot_alphaxtics();   //allocates axtic with fl_strdup
>> in this way we can "control" the usage of the memory.
> You're absolutely right, this is one of the bugs in that function
> - it should call free_atics() before allocating new strings (and
> at least the first elements of both the sp-axtic and sp->aytic
> array must then be initialized with NULL). Unfortunately, all I
> can do is fix the bug in the newest version. I guess it will be
> available as a pre-release version within the next few days.

Glad to hear I was not too off!

>> Hope someone can suggest a better solution.
> Without you're moving to a newer version I don't know any better
> way, sorry. Your fix of calling fl_set_xyplot_xtics() to force the
> deallocation to happen seems to be the simplest way at the moment.

Thanks for the info. I will stick to it then.

> Would you be prepared to give a new version a try? xforms-1.0 is
> really, really old (at least 9 years) and I am in the process of
> releasing version 1.2 hopefully soon, just trying to get rid of
> a few known bugs - the one you've found has become one of them
> now;-)

I'd be more than happy to give it a try, unfortunately that might have a
big impact on our software and our team is not really willing to give
away the reliability we achieved so far. So there might be some time
before we can transit to the newest version.

>                             Best regards, Jens

reply via email to

[Prev in Thread] Current Thread [Next in Thread]