Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!mcvax!ukc!mucs!liv-cs!phil From: phil@mva.cs.liv.ac.uk Newsgroups: comp.sys.mac.programmer Subject: Help needed with lots of Resources!! Message-ID: <5455@mva.cs.liv.ac.uk> Date: 15 May 89 16:33:51 GMT Organization: Computer Science CSMVAX, Liverpool University Lines: 31 I've started work on the most enormous Mac program I've ever written (which isn't hard 'cos I haven't written very many) and I'm wondering about the best way to write it. Basically the program is choc-a-bloc with resources - most PICTs, which I need to display, and probably "snd "s too. The program has a number of sections, which can be called in a sequence which is not known in advance, and each section needs various PICTs and snds. The question is this: Is it better to get handles to all of the resources that I will be using at the beginning of the program (they are all mostly purgeable resources) and then dispose of them at the end, or is it better only to Get them when the appropriate section starts, and to do a ReleaseResource on them when I'm through with that section. The trouble is that I got the impression from the Resource Manager section of IM that you should only do a Release on a resource that you're through with, and I don't know whether I am until I exit my program! I am therefor a little confused and would welcome advice from anyone who cares to give it. For information, the program is to be used by children - hence the large number of pictures and sounds, and I'm writing it using LSP 2.0, which is just _wonderous_ !!!!! (I just love that debugger!!) Thanks for your help! Phil Jimmieson, *************************************************** Computer Science Dept., * * Liverpool University, * JANET : PHIL@UK.AC.LIV.CS.MVA * Merseyside, England, * ARPA : PHIL%mva.cs.liv.ac.uk@cunyvm.cuny.edu * L69 3BX * * * * (UK) 051-794-3689 ***************************************************