freetype
[Top][All Lists]
Advanced

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

[Freetype] Using FT_New_Library() in order to provide custom MM?


From: Jeff Chow
Subject: [Freetype] Using FT_New_Library() in order to provide custom MM?
Date: Thu, 15 Feb 2001 14:51:46 -0800

Hi Everyone,

I'm creating a FT_MemoryRec_ statically to make freetype use my own
memory-management routines.
However, in FT_Done_Memory, the standard C free() is called on the memory
pointer that I provided to
freetype in FT_New_Library.

There are a number of issues I'd like to bring up:

1) If no custom memory allocators/deallocates are specified, wouldn't it be
better for freetype to just use
a static FT_MemoryRec_ to store its function tables, rather than having to
allocate/deallocate one?

2) If I *do* specify custom memory allocators/deallocators, why am I forced
to use CRT's alloc() call to create it?
Using alloc() just once would defeat the purpose of us specifying the custom
functions. The cleanest way would be to
declare a static FT_MemoryRec_ object and pass it in to FT_New_Library().
FT_Done_Freetype() would be changed so that it doesn't delete the memory
handle at all.

What do you think?
Yours,
Jeff




reply via email to

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