freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] bug?


From: David Turner
Subject: Re: [Devel] bug?
Date: Thu, 22 Feb 2001 16:13:40 +0100

Hi, 

Werner LEMBERG a écrit :
> 
> > > ./memtest 120 /usr/local/share/fonts/Truetype/Times.ttf
> > Times.ttf: OK.
> > Trying to release an unallocated block at 0x804a5b0
>

it's a bug in "ft2demos/src/memtest.c" that wasn't caught until we
fixed another bug in "FT_Done_Memory()" :-)

Actually, I've just commited a change to the CVS where the
debug memory manager is allocated through "my_alloc" instead
of being a constant structure..

FreeType 2.0.2.test itself should be safe from this bug.. 

> Thanks for the report.  Maybe we should add a flag
> `user_provided_memory_object' to the FT_MemoryRec structure which is
> set by FT_New_Library() so that FT_Done_FreeType() knows that it
> shouldn't call FT_Done_Memory().
> 
> David, can you fix it?
>
Well, if we really wanted to do things well, we would add at
least the following to FT_MemoryRec:

    - a reference count
    - a destructor

but this is a public structure, even if it is seldom
used by client apps. I don't think it's appropriate
for the 2.0.2 release. Maybe for 2.1

Regards,

- David
Actually, if we want to do things correctly, I now think that
what we should have a reference count and a destroy notification
function in FT_MemoryRec.

However,



reply via email to

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