Women in Technology

Hear us Roar



Article:
  Building a Scratch Pad with Cocoa
Subject:   Memory leak?
Date:   2001-12-04 09:16:39
From:   retro
I notice in the final version, that you retain the path but you never release it. Is this a problem? I know that it is good practice to always balance retains with releases, and it seems that there should be a dealloc method for this subclass in order to release the memory.


What will happen to this memory if you simply quit the program? Is there some kind of global memory sweep that happens at the time of program termination? Just curious on this one.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Michael Beam photo Memory leak?
    2001-12-04 23:04:11  Michael Beam | O'Reilly Author [View]

    You're right, i should have put a dealloc method in the view class that would release the path object. Good eye! As for your second question, yes, memory used by an application, leaks and all, it released when said application quits.