| www.delorie.com/archives/browse.cgi | search |
| From: | Sean Proctor <sproctor AT ccs DOT neu DOT edu> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: They do NOT run the same! W95/DOS! |
| Message-ID: | <vsdlls43cjmed86o8gsi8ff23sc42qr223@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> |
| X-Newsreader: | Forte Agent 1.7/32.534 |
| MIME-Version: | 1.0 |
| Lines: | 32 |
| Date: | Thu, 29 Jun 2000 02:41:47 GMT |
| NNTP-Posting-Host: | 207.16.153.202 |
| X-Complaints-To: | Abuse Role <abuse AT enter DOT net>, We Care <abuse AT newsread DOT com> |
| 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 <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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |