delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/29/07:03:46

From: Radical NetSurfer <radsmail AT juno DOT com>
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: <s97hls8hlhbikfhjkaut11p3lavr480eq2 AT 4ax DOT com> <gvvhls8pqkvcavrc6odvj2ud1mnuuj553h AT 4ax DOT com> <8F60AAC2BASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> <rt6ils4mql8imek537fpr0acsgkheqplbh AT 4ax DOT com> <8F60CED96ASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> <pghjlssch2tf8ml1uc9ugq9kkah82dv23c AT 4ax DOT com> <vsdlls43cjmed86o8gsi8ff23sc42qr223 AT 4ax DOT com>
X-Newsreader: Forte Agent 1.8/32.548
X-No-Archive: yes
MIME-Version: 1.0
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 <sproctor AT ccs DOT neu DOT edu>
wrote:

>On Wed, 28 Jun 2000 05:37:15 -0400, Radical NetSurfer
><radsmail AT juno DOT com> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019