freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] PCF driver memory leaks solved..


From: Francesco Zappa Nardelli
Subject: Re: [Devel] PCF driver memory leaks solved..
Date: 28 Jan 2002 14:36:47 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1

NM> I've changed the following to the PCF driver in my own
NM> build.

Great.  Some comments...

NM>    FT_LOCAL_DEF FT_Error
NM>    PCF_Done_Face( PCF_Face  face )
NM>    {
NM>      FT_Memory    memory = FT_FACE_MEMORY( face );
NM>      PCF_Property tmp    = face->properties;
NM>      PCF_Toc      toc   =  &face->toc;
NM>      PCF_Table    toctable = face->toc.tables;
NM>      int i;
NM>      unsigned int j;

Why do you declare toc, toctable, and j?  They are never used.

NM>      FREE( face->encodings );
NM>      FREE( face->metrics );

NM>      for ( i = 0; i < face->nprops; i++ )
NM>      {
NM>        FREE( tmp->name );
NM>        if ( tmp->isString )
NM>          FREE( tmp->value );
NM>        tmp++;
NM>      }
NM>      FREE(face->properties );
NM>      FREE(face->toc.tables);
NM>      FREE(face->root.family_name);
NM>      FREE(face->root.available_sizes);
NM>      FREE(face->charset_encoding);
NM>      FREE(face->charset_registry);

This looks good to me.  

NM>      FT_TRACE4(( "DONE_FACE!!!\n" ));

NM>      return PCF_Err_Ok;
NM>    }

The problem appears to be completely unrelated from the bitmap buffer
in the face object.  

Please, confirm that this solve your memory leak problem.  If yes, I
will provide a patch.

Regards,
-francesco




reply via email to

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