Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!psuvax1!psuvm.bitnet!cunyvm!nyser!cmx!rodan.acs.syr.edu!pcossenb From: pcossenb@rodan.acs.syr.edu (Paul C. Ossenbruggen) Newsgroups: comp.sys.mac.programmer Subject: Heaps + Undo Message-ID: <1634@cmx.npac.syr.edu> Date: 5 Jun 89 20:50:25 GMT Sender: usenet@cmx.npac.syr.edu Reply-To: pcossenb@rodan.acs.syr.edu Organization: Syracuse University, Syracuse, New York Lines: 30 I have a question about heaps. It seems that during the execution of my program a lot of little handles are created (13 bytes, to be exact) and then deleted. So what I get on the heap is hundreds of these thirteen byte chunks of free space. It does not seem to create any problems but I am wondering if it is symptomatic of a bug. I have used TMON's heap scramble and purge and have had no crashes (this also gets rid of them). So if it does not matter, I will forget about it but if you know what might be the cause and if it is a problem please let me know. Also does anyone have any experience writing routines to handle undo? If you have, could you give me an overview of the procedures involved for implementing it in a graphics environment? I'd mainly like to know how you store the info that has been deleted and then restore it without creating anomolies. It would be really helpful if you had some example code I could look at or if you know of some that is available. Thanks. - Paul ------------------------------------------------------------------------------- | Paul C. Ossenbruggen pcossenb@rodan.acs.syr.edu | | Syracuse University rspco@suvm.bitnet | | pcossenb@sunrise.acs.syr.edu |