Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!brutus.cs.uiuc.edu!lll-winken!uunet!uvm-gen!chaffee From: chaffee@uvm-gen.UUCP (Alex D. Chaffee,,,6581273) Newsgroups: comp.sys.mac.programmer Subject: Re: Moving resources into the system file Message-ID: <1241@uvm-gen.UUCP> Date: 25 Jul 89 04:54:28 GMT Sender: nobody@uvm-gen.UUCP Distribution: na Organization: EMBA Computer Facility, Univ. of Vermont, Burlington. Lines: 41 Tim Maroney (tim@hoptoad.uucp) writes: >Yes. I'm just wondering why there's a difference between adding >resources to the map and just accessing them. They must be thrown away >somehow if they're in the application heap; when the system decides to >throw them away, what's the difference between one that's been added >recently and one that hasn't? Actually, the difference is that the added handle pointed to data that was in the application heap. Remember, I was loading a resource from another file, detaching it, and then adding it to the system file. When the application quit, this heap was no longer valid, but the handle remained. >So, the original questioner could do a ReleaseResource as I suggested, >but a better approach would be to allocate the resource storage in the >system heap before adding it to the system file. Then the >ReleaseResource becomes unneccessary. This is impractical. I would either have to copy the resource between the heaps, requiring twice as much memory, or do some pre-load mucking with the resource map to set the System Heap bit on, which sounds more dangerous than just releasing the resource once IUm through with it. MultiFinder will load it into the system heap the next time anyone wants it anyway. jerryg@Apple.COM (Jerry Godes) quotes Tech Note 180: MultiFinder Miscellanea [Confirms that MultiFinder loads all system resources into the system heap.] I was wrong; it is documented. Yet my original gripe with this scheme still stands. Isn't MultiFinder supposed to be transparent to programs which don't make use of it? I know, I know... "And the Congress is supposed to represent the people... and comic strips aren't supposed to end..." "Gilda Radner isn't supposed to end." "Probably the Government's fault." __________________________ Bloom County Alex Chaffee chaffee@emily.uvm.edu ____________________________