CVSROOT: /sources/freetype Module name: ft2demos Changes by: David Turner <freetype> 06/06/04 15:00:59
Modified files: . : ChangeLog src : ftbench.c Log message: * src/ftbench.c (main): fixed a subtle memory corruption bug at program exit. Reported by [EMAIL PROTECTED] CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/ft2demos/ChangeLog?cvsroot=freetype&r1=1.161&r2=1.162 http://cvs.savannah.gnu.org/viewcvs/ft2demos/src/ftbench.c?cvsroot=freetype&r1=1.25&r2=1.26 Patches: Index: ChangeLog =================================================================== RCS file: /sources/freetype/ft2demos/ChangeLog,v retrieving revision 1.161 retrieving revision 1.162 diff -u -b -r1.161 -r1.162 --- ChangeLog 21 May 2006 18:56:25 -0000 1.161 +++ ChangeLog 4 Jun 2006 15:00:59 -0000 1.162 @@ -1,3 +1,8 @@ +2006-06-04 David Turner <[EMAIL PROTECTED]> + + * src/ftbench.c (main): fixed a subtle memory corruption bug + at program exit. Reported by [EMAIL PROTECTED] + 2006-05-21 Werner Lemberg <[EMAIL PROTECTED]> * src/ftdump.c (Print_Type): Fix type for `module'. Reported by Index: src/ftbench.c =================================================================== RCS file: /sources/freetype/ft2demos/src/ftbench.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -b -r1.25 -r1.26 --- src/ftbench.c 25 Feb 2006 22:32:36 -0000 1.25 +++ src/ftbench.c 4 Jun 2006 15:00:59 -0000 1.26 @@ -796,11 +796,24 @@ } } + /* the following is a bit subtle: when we call FTC_Manager_Done, + * this normally destroys all FT_Face objects that the cache might + * have created by calling the face requester. + * + * however, this little benchmark as a tricky face requester that + * doesn't create a new FT_Face through FT_New_Face, but simply + * pass a pointer to the one that was previously created. + * + * if the cache manager was used before, the call to FTC_Manager_Done + * will discard our single FT_Face. + * + * in the case where no cache manager is in place, or if no test + * was run, the call to FT_Done_FreeType will release any remaining + * FT_Face anyway + */ if ( cache_man ) FTC_Manager_Done( cache_man ); - FT_Done_Face( face ); - FT_Done_FreeType( lib ); return 0; _______________________________________________ Freetype-cvs mailing list Freetype-cvs@nongnu.org http://lists.nongnu.org/mailman/listinfo/freetype-cvs