Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!gatech!hubcap!ncrcae!ncr-sd!hp-sdd!ucsdhub!esosun!seismo!uunet!mcvax!unido!ecrcvax!crcge1!inria!rouaix From: rouaix@inria.UUCP Newsgroups: comp.sys.amiga Subject: SetWindowTitles and memory allocation Message-ID: <534@inria.UUCP> Date: Wed, 30-Sep-87 11:56:58 EDT Article-I.D.: inria.534 Posted: Wed Sep 30 11:56:58 1987 Date-Received: Sat, 3-Oct-87 12:06:37 EDT Organization: INRIA, Rocquencourt. France Lines: 21 Keywords: memory eater I have a question about SetWindowTitles and memory allocation. 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" ?? 2) It's reasonnable to think that the pointer to the window's titles string will be updated. What happens if the string "Wapdoowap" is somewhere in the stack, and then after some other code, this part of the stack is destroyed ? Does SetWindowTitles() copy the string for its own use ?? More generally, do we have such functions that use memory they can't deallocate anyway ? -- *- Francois Rouaix / When the going gets tough, * *- USENET:rouaix@inria.inria.fr \/ the guru goes meditating...* * SYSOP of Sgt. Flam's Lonely Amigas Club. (33) (1) 39-55-84-59 (Videotext) *