Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!sun-barr!oliveb!amiga!cbmvax!kevin From: kevin@cbmvax.UUCP (Kevin Klop) Newsgroups: comp.sys.amiga.tech Subject: Re: AllocRemember() / FreeRemember help needed Message-ID: <7434@cbmvax.UUCP> Date: 25 Jul 89 05:51:58 GMT References: <784@bnr-fos.UUCP> Reply-To: kevin@cbmvax.UUCP (Kevin Klop) Organization: Commodore Technology, West Chester, PA Lines: 34 In article <784@bnr-fos.UUCP> protcoop@leibniz.uucp () writes: >In a second file, I have the following: > >extern struct Remember *resources; >..... >tgad = AllocRemember( resources, sizeof(struct Gadget), MEMF_CHIP ); You need to pass the ADDRESS of resources. Thus, the call should be: tgad = AllocRemember(&resources, sizeof(struct GFadget), MEMF_CHIP); > > >In a third file: >extern struct Remember *resources; >...... >if (resources) >{ > printf("memory freed\n"); > FreeRemember( resources, TRUE ); >} This should work fine with the above change. -- Kevin -- Kevin Klop {uunet|rutgers|amiga}!cbmvax!kevin Commodore-Amiga, Inc. The number, 111-111-1111 has been changed. The new number is: 134-253-2452-243556-678893-3567875645434-4456789432576-385972 Disclaimer: _I_ don't know what I said, much less my employer.