> An NSMapTable can be configured to give either reasonable behavior
> (strong or zeroing weak reference) so use that instead.
Or, in this special case, simply make sure that the dictionary is only used
while the controller is live--especially easy if the dictionary is a private
field of the contr
On Sat, Dec 20, 2008 at 7:00 AM, Clark S. Cox III wrote:
> The objective-c garbage collector does not move objects, so that is not an
> issue with using raw pointers.
But note that storing a pointer value in a string like this is still
problematic under garbage collection. It will not act like a
The objective-c garbage collector does not move objects, so that is
not an issue with using raw pointers.
Sent from my iPhone
On Dec 20, 2008, at 6:50, "Dong Feng" wrote:
I have a concern that the direct use of a pointer as a memory address
may have a problem in the case of GC. In Java, obj
I have a concern that the direct use of a pointer as a memory address
may have a problem in the case of GC. In Java, object reference is not
a simple memory address because objects may be moved by GC. Does Cocoa
has a GC implementation avoid it?
2008/12/19 Carter R. Harrison :
>
> On Dec 18, 200
On Thu, Dec 18, 2008 at 3:53 PM, Carter R. Harrison
wrote:
> Once again you have saved me from pulling my hair out. Thank you once again
> for your assistance. For the rest of the folks on the thread the solution
> was to remove the "&" from the front of all my pointers.
I'd suggest that your b
On Dec 18, 2008, at 3:44 PM, David Duncan wrote:
On Dec 18, 2008, at 11:57 AM, Carter R. Harrison wrote:
[dict setValue:@"button1" forKey:[NSString stringWithFormat:@"%x",
&button1]]; // "button1" is one of my IBOutlets.
NSString *value = [dict valueForKey:[NSString
stringWithFormat:@"%
On Dec 18, 2008, at 11:57 AM, Carter R. Harrison wrote:
[dict setValue:@"button1" forKey:[NSString stringWithFormat:@"%x",
&button1]]; // "button1" is one of my IBOutlets.
NSString *value = [dict valueForKey:[NSString
stringWithFormat:@"%x", &sender]];
It seems like the memory address of
On Dec 18, 2008, at 11:57, Carter R. Harrison wrote:
I have a Nib file setup with an NSView and some NSButton's as
subviews of that view. I have IBOutlets for each of the NSButton's
in my NSView subclass.
In the awakeFromNib: method of my NSView subclass I do the following:
- (void)awakeF
Ok, hopefully this is an easy one.
I have a Nib file setup with an NSView and some NSButton's as subviews
of that view. I have IBOutlets for each of the NSButton's in my
NSView subclass.
In the awakeFromNib: method of my NSView subclass I do the following:
- (void)awakeFromNib
{