From: Sean Proctor Newsgroups: comp.os.msdos.djgpp Subject: Re: They do NOT run the same! W95/DOS! Message-ID: References: <8F60AAC2BASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> <8F60CED96ASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 32 Date: Thu, 29 Jun 2000 02:41:47 GMT NNTP-Posting-Host: 207.16.153.202 X-Complaints-To: Abuse Role , We Care X-Trace: newshog.newsread.com 962246507 207.16.153.202 (Wed, 28 Jun 2000 22:41:47 EDT) NNTP-Posting-Date: Wed, 28 Jun 2000 22:41:47 EDT Organization: ENTER.net (enter.net) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Wed, 28 Jun 2000 05:37:15 -0400, Radical NetSurfer wrote: >2) globally, I have >BITMAP *da_bmp=NULL; >... >INSIDE the main module... > >da_bmp = create_bitmap(...); >.... >destroy_bitmap(da_bmp); >da_bmp=NULL; >... >THEN INSIDE functions (locations NOT inside main), >I simply re-assign the Global pointer >da_bmp = create_bitmap(...) > >and thats is all there is to tell. that doesn't make much sense to me... when you re-assign the global pointer inside the fuctions you're losing what it was previously pointing to... so unless you have something like: BITMAP *tmp = da_bmp; da_bmp = create_bitmap(...) ... destroy_bitamp(da_bmp); da_bmp = tmp; or destroy the bitmap before you reassign it... you're going to have unfreed memory. which I don't think would give actually errors... except in memory leaks... but what do I know? Sean