here's the whole function, just notice the code that is commented...
ot_FntDefineFont replaces FntDefineFont
(ot stands for OliveTree)
/***********************************************************************
*
* ot_FntDefineFont
*
**********************************************************************/
extern void ot_FntDefineFont(fontID MyId, FontPtr pFontTypeInst);
void ot_FntDefineFont(fontID MyId, FontPtr pFontTypeInst)
{
//ULong before_freeBytes = 0;
//ULong after_freeBytes = 0;
//ULong maxChunk = 0;
//*************************************************
// causes CRASHES in the sumulators, but not the actual devices.
// BUT necessary for the Palm T5, else it looses much memory
//*************************************************
if( pCBibleDesktopInst->pOTHWInst->IsOS50())
FntDefineFont(MyId, 0);
// get the memory before
//MemHeapFreeBytes (0, &before_freeBytes, &maxChunk);
//*************************************************
// set the font
//*************************************************
FntDefineFont(MyId, pFontTypeInst);
// get the memory after
//MemHeapFreeBytes (0, &after_freeBytes, &maxChunk);
// loosing about 2/3 of the size of the font passed in on a T5
//ULong MemoryLoss = before_freeBytes - after_freeBytes;
}
----- Original Message -----
From: "Regis St-Gelais" <[EMAIL PROTECTED]>
Newsgroups: palm-dev-forum
To: "Palm Developer Forum" <[email protected]>
Sent: Monday, January 31, 2005 4:15 PM
Subject: Re: Memory leak in T5?
> "Drew Haninger" <[EMAIL PROTECTED]> a écrit dans le message de news:
> [EMAIL PROTECTED]
> > it can only be done on OS 5.0, discoved through via experimentation and
a
> > tip on this newsgroup, could not find any documentation.
> >
> > Drew
>
>
> Drew,
>
> How do you test/mesure that memory leak?
> Do you have a small test application?
>
> Does the leak happen the fisrt time you call FntDefineFont(fontID.. or
only
> if you redefine a new font with the same fontID ??
>
> Thanks
>
> --
> Regis St-Gelais
> www.laubrass.com
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/support/forums/