From: Paul Shirley Newsgroups: comp.os.msdos.djgpp Subject: Re: Freeing static vars Date: Thu, 5 Feb 1998 21:50:36 +0000 Organization: wot? me? Lines: 12 Message-ID: References: <199802050138 DOT RAA05569 AT adit DOT ap DOT net> <3 DOT 0 DOT 5 DOT 32 DOT 19980205125943 DOT 007b3180 AT math DOT amu DOT edu DOT pl> NNTP-Posting-Host: chocolat.foobar.co.uk Mime-Version: 1.0 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article <3 DOT 0 DOT 5 DOT 32 DOT 19980205125943 DOT 007b3180 AT math DOT amu DOT edu DOT pl>, Maciej Radziejewski writes >Perhaps it is too obvious to write, but isn't this accomplished in C++ >by defining a local scope and declaring the variables inside it? >The variables will be destroyed upon leaving the local scope. 1st: they are only static if you mark them 'static' 2nd: static variables are not destroyed on leaving a scope (thats the meaning of static after all!), only the name is hidden. --- Paul Shirley: my email address is 'obvious'ly anti-spammed