delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/16/04:17:39

From: G DOT DegliEsposti AT ads DOT it
To: djgpp AT delorie DOT com
Message-ID: <C125658E.002DBD33.00@vega.ads.it>
Date: Fri, 16 Jan 1998 10:16:53 +0100
Subject: Re: Is this Ok?
Mime-Version: 1.0





>In Allegro(v3), is this code ok for redefining a bitmap?
>...
>BITMAP *b=create_bitmap(x1,y1); //Size doesn't matter
>...
>destroy_bitmap(b);  //kill it
>BITMAP *b=create_bitmap(x2,y2);  //Any size

 ^ you can't declare the same variable b twice (damned cut&paste :-)

>...
>Does this de-allocate memory then re-allocate it proberly?

Yes, it should work (at least it does in v2.x :-)
(of course it is not garanteed to return exactly the same memory
for the bitmap structure)

ciao
  Giacomo





- Raw text -


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