From: Radical NetSurfer Newsgroups: comp.os.msdos.djgpp Subject: Re: They do NOT run the same! W95/DOS! Date: Thu, 29 Jun 2000 06:07:02 -0400 Message-ID: <4t7mls8dmrs2pkak1295j816j73uhv3to5@4ax.com> References: <8F60AAC2BASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> <8F60CED96ASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> X-Newsreader: Forte Agent 1.8/32.548 X-No-Archive: yes MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 216.202.134.242 X-Original-NNTP-Posting-Host: 216.202.134.242 X-Trace: 29 Jun 2000 06:09:30 -0400, 216.202.134.242 Lines: 39 X-Original-NNTP-Posting-Host: 64.31.79.51 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Okay. This looks promising, I will definately try it. { ...wish I saw that earlier...} On Thu, 29 Jun 2000 02:41:47 GMT, Sean Proctor wrote: >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