FROM : Hamish Allan
DATE : Wed Apr 13 02:23:16 2005
On Tue, 12 Apr 2005 16:02:32 -0700, "Louis C. Sacha"
<<email_removed>> wrote:
> First, it isn't safe to assume that the only autoreleased objects
> being created are those which you explicitly create yourself. In my
> example, the code being executed in the loop
>
> found = [checker checkSpellingOfString:testString startingAt:0];
>
> doesn't explicitly create any autoreleased objects itself, but there
> could be any number or kind of autoreleased objects being created
> behind the scenes in the implementation of that method.
Just out of interest, which classes if any from Foundation and AppKit
fill up the autorelease pool in this way? Seems like it would be a good
idea when writing library functions either to create and release a
local autorelease pool, or where possible to alloc and release objects
rather than using convenience constructors.
Best wishes,
Hamish
DATE : Wed Apr 13 02:23:16 2005
On Tue, 12 Apr 2005 16:02:32 -0700, "Louis C. Sacha"
<<email_removed>> wrote:
> First, it isn't safe to assume that the only autoreleased objects
> being created are those which you explicitly create yourself. In my
> example, the code being executed in the loop
>
> found = [checker checkSpellingOfString:testString startingAt:0];
>
> doesn't explicitly create any autoreleased objects itself, but there
> could be any number or kind of autoreleased objects being created
> behind the scenes in the implementation of that method.
Just out of interest, which classes if any from Foundation and AppKit
fill up the autorelease pool in this way? Seems like it would be a good
idea when writing library functions either to create and release a
local autorelease pool, or where possible to alloc and release objects
rather than using convenience constructors.
Best wishes,
Hamish
| Related mails | Author | Date |
|---|---|---|
| Denis Stanton | Apr 11, 02:35 | |
| Dan Saul | Apr 11, 18:22 | |
| Denis Stanton | Apr 12, 10:47 | |
| Louis C. Sacha | Apr 12, 12:07 | |
| The Karl Adam | Apr 12, 17:07 | |
| Evan DiBiase | Apr 12, 17:41 | |
| Louis C. Sacha | Apr 13, 01:02 | |
| Hamish Allan | Apr 13, 02:23 | |
| Denis Stanton | Apr 13, 06:20 | |
| Denis Stanton | Apr 13, 22:38 |






Cocoa mail archive

