[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FT_FACE_FLAG_EXTERNAL_STREAM -> memory leak ???
From: |
Just van Rossum |
Subject: |
Re: FT_FACE_FLAG_EXTERNAL_STREAM -> memory leak ??? |
Date: |
Thu, 27 Jul 2000 18:43:15 +0100 |
At 1:01 PM +0200 27-07-2000, Boris Letocha wrote:
>Hi!
>
>Its look like memory leak problem then I use external stream in OpenFace.
>
>in ft_new_input_stream is new stream allocated each time FT_OpenFace is
>called
>but when it is external ft_done_stream is not called.
>
> /* close the stream for this face if needed */
> if ( ( face->face_flags & FT_FACE_FLAG_EXTERNAL_STREAM ) == 0 )
> ft_done_stream( &face->stream );
>
>But ft_done_stream not only closes stream, but also free memory of stream!
I think you're right. When prividing a stream in the FT_Open_Args struct
for FT_Open_Face, a new stream is allocated, and the contents from the
supplied one is copied. So it seems FT_Done_Face should alsways free the
stream (it's always allocated by FT after all), but only call the close
function when it's not marked as "external".
Just