🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #2763

Re: Fonts and freeing memory

#2763
From: Bruce Dawson
Date: Mon, 15 Jan 1990 00:09
31 lines
1357 bytes
> root writes:
> 
> Msg-ID: <145@ccave.UUCP>
> Posted: 9 Jan 90 03:21:25 GMT
> 
> Org.  : Chameleon's Cave [JDCP 0.96]
> Person: Juergen Hermann
> 
> You MUST use OpenFont() to look for resident fonts before ever calling
> OpenDiskFont(). If not, the font is made resident over and over again, in
> fact loosing memory for nothing.
> 
> So do something like
> 
>     if ((WinFont = (struct TextFont *) OpenFont (&ta)) == NULL &&
>             (WinFont = (struct TextFont *) OpenDiskFont (&ta)) == NULL) {
>         Abort ("Can't open font\n");
>     }
> 
> --
>    //  Juergen Hermann          UUCP: ira.uka.de!smurf!ccave!root
>  \X/   75 Karlsruhe 1, FRG      Fido: 2:241/2.1212@FidoNet


     Are you sure about having to call OpenFont() to avoid losing memory?  I
have never seen that documented, and when I tried it just now (opened the same
font several times, closing it after each opening, checking for memory loss,
using OpenDiskFont() only) and I had no memory loss, except (of course) on the
first open.

.Bruce Dawson.
Technical Details
Message-ID: <942@mindlink.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!van-bc!rsoft!mindlink!a464

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!van-bc!rsoft!mindlink!a464
From: a464@mindlink.UUCP (Bruce Dawson)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Fonts and freeing memory
Message-ID: <942@mindlink.UUCP>
Date: 15 Jan 90 00:09:43 GMT
Organization: MIND LINK! - British Columbia, Canada
Lines: 31