Mail Archives: djgpp/1998/01/29/00:33:12
From: | "John M. Aldrich" <fighteer AT cs DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Freeing static vars
|
Date: | Wed, 28 Jan 1998 19:16:12 -0500
|
Organization: | Two pounds of chaos and a pinch of salt.
|
Lines: | 21
|
Message-ID: | <34CFCA4C.1868@cs.com>
|
References: | <01bd2bd6$73dcfc60$LocalHost AT default>
|
NNTP-Posting-Host: | ppp213.cs.com
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Rylan wrote:
>
> Is there anyway to free static variables under DJGPP when they have
> outlived their usefulness?
Of course not! Static variables are permanent by their very nature. If
you are trying to implement some sort of changeable global structure,
then you can use a pointer and allocate and free memory for it like any
other pointer.
If you're trying to use some sort of data that can "outlive its
usefulness", then you probably don't want to make it static in the first
place.
--
---------------------------------------------------------------------
| John M. Aldrich | "Autocracy is based on the assumption|
| aka Fighteer I | that one man is wiser than a million |
| mailto:fighteer AT cs DOT com | men. Let's play that over again, |
| http://www.cs.com/fighteer | too. Who decides?" - Lazarus Long |
---------------------------------------------------------------------
- Raw text -