home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sybus.sybus.com!myrddin!palan!tct!deep6!nifty.UUCP!fgd3
- From: fgd3@nifty.UUCP (Fabbian G. Dufoe, III)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: AllocRemember - how does it work?
- Message-ID: <fgd3.03et@nifty.UUCP>
- Date: 4 Jan 93 03:06:44 EST
- References: <d2hacker.724952539@dtek.chalmers.se> <1i5rpcINNj4j@agate.berkeley.edu>
- Distribution: world
- Organization: Fabbian G. Dufoe, III
- Lines: 27
-
- In article <1i5rpcINNj4j@agate.berkeley.edu> cliffwd@soda.berkeley.edu (Cliff Draper) writes:
- >
- >The AutoDocs describe this Intuition command. But if your AutoDocs arn't
- >handy....
- >
- >struct Remember *remkey=NULL;
- >
- >char *block1, *block2;
- >
- >if (!(block1=(char *) AllocRemember(&remkey, BLOCK1SIZE, MEMF_CLEAR)))
- > fail("insufficient memory");
- >if (!(block2=(char *) AllocRemember(&remkey, BLOCK2SIZE, MEMF_CLEAR)))
- > fail("insufficient memory");
- >/* use the 2 blocks as if you got them from AllocMem() */
- >fail("all done");
- >...
- >/* and within fail() */
- >FreeRemember(*remkey, TRUE);
-
- That'll cause you some problems. It should be FreeRemember(&remkey,
- TRUE) instead of "*remkey".
-
- --Fabbian G. Dufoe, III
- 350 Ling-A-Mor Terrace South | GEnie: F.DUFOE3
- St. Petersburg, Florida 33705 | internet: fgd3%nifty@tct.com
- 813-823-2350 | uucp: ...tct!deep6!nifty!fgd3
-
-