Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!nysernic!itsgw!batcomputer!cornell!uw-beaver!mit-eddie!ll-xn!ames!ucbcad!zen!hoser.berkeley.edu!bryce From: bryce@hoser.berkeley.edu.UUCP Newsgroups: comp.sys.amiga Subject: Re: SetWindowTitles and memory allocation Message-ID: <4125@zen.berkeley.edu> Date: Sat, 3-Oct-87 00:01:57 EDT Article-I.D.: zen.4125 Posted: Sat Oct 3 00:01:57 1987 Date-Received: Sun, 4-Oct-87 02:23:40 EDT References: <534@inria.UUCP> Sender: news@zen.berkeley.edu Reply-To: bryce@hoser.berkeley.edu.UUCP (Bryce Nesbitt) Organization: Center Tapped Solids, Inc. Lines: 26 Keywords: memory eater In article <534@inria.UUCP> rouaix@inria.UUCP (Francois Rouaix) writes: > > Suppose you have a window with a title "Shoobeedoo". > Let's call SetWindowTitles(window,"Wapdoowap",0). > What happens to the string "Shoobeedoo" ??? > >1) Now who deallocates the memory used by the string "Shoobeedoo" ?? Whoever allocated it. When you open a window you pass a static string for the title. When you change titles you just tell Intuition to set it's internal pointer to this _other_ section of memory. You own all the memory involved. You allocate it, you deallocate it. Normally it will just be part of your DATA segment/hunk and you don't need to think about it. [In a more general and esoteric sense... Window structure had better inherit task pointers at some point or the input.device is going to have quite a time convincing the MMU, "No, really. I have a right to look at that memory." Just one of many little rocks on the way to protection.] |\ /| . Ack! (NAK, ENQ, SYN) {o O} . (") bryce@hoser.berkeley.EDU -or- ucbvax!hoser!bryce U How can you go back if you have not yet gone forth?