Thanks mmalc,
Your post helps tremendously, I kept asking myself how do I know if I
am the owner of an object??? After reading the memory management info
you linked to I think I am beginning to understand. I am new to mac
programming and you have really helped me understand some of the
On Dec 26, 2008, at 9:41 AM, Steve Wetzel wrote:
How do you know that number with Integer creates an autoreleased
object? I do not see that in the documentation. As also mentioned
in a reply, decimalNumberByDividingBy does not have a retain count
either. I am new to mac programming but I
Thanks for the info Dave,
How do you know that number with Integer creates an autoreleased
object? I do not see that in the documentation. As also mentioned
in a reply, decimalNumberByDividingBy does not have a retain count
either. I am new to mac programming but I do not see this in th
On Dec 26, 2008, at 8:29 AM, Steve Wetzel wrote:
Does anyone know why the follow code produces an error on [pool
release]?. I get the following error :
"*** -[NSDecimalNumber release]: message sent to deallocated
instance 0x10c310". How am I overreleasing anything
There are so many prob
So... firstly, - tempNum = [[NSDecimalNumber alloc] init] at the end
of a method after assigning an autoreleased instance of
NSDecimalNumber to it - why? I'm trying to understand the logic in
this and can't. As near as I can tell you aren't doing any book-
keeping of this later on.
What I
On Dec 26, 2008, at 8:29 AM, Steve Wetzel wrote:
-(void)setNumerator:(NSInteger)n {
[numerator release];
numerator = [NSNumber numberWithInteger:n];
+numberWithInteger creates an autoreleased object. You are also
releasing numerator explicitly in your -dealloc method, so whe
[decimalNumber release];
decimalNumber = [tempNum decimalNumberByDividingBy:tempDenom];
that releases the earlier retained decimalNumber
then replaces it with one from a convenience method
decimalNumberByDividingBy: which doesn't have a retain count (not
alloc, not copy), so