NSTimer and messages
NSTimer and messages
- Subject: NSTimer and messages
- From: <email@hidden>
- Date: Tue, 28 Oct 2003 06:00:21 -0800
- Thread-topic: NSTimer and messages
Signals are a basic inter-process communication mechanism in Unix like systems. Signals 10 and 11 are generally sent by the operating system to applications to indicate that a bad pointer was de-referenced.
Objects that that are obtained via convenience class methods like +valueWithPoint: are automatically deallocated at some future time. Your bug is that you obtain myValue with [NSValue valueWithPoint: myPoint]. As a result, myValue has been deallocated by the time the timer calls -try.
Use myValue = [[NSValue alloc] initWithPoint: myPoint];
Read Apple's introductory/conceptual information about memory management conventions in Cocoa.
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/
Read the various and many third party articles on the subject.
http://www.stepwise.com/Articles/Technical/2001-03-11.01.html
http://www.stepwise.com/Articles/Technical/MemoryManagement.html
http://www.stepwise.com/Articles/Technical/HoldMe.html
http://www.macdevcenter.com/pub/a/mac/excerpt/Cocoa_ch04/
http://cocoadevcentral.com/articles/000055.php
http://osx.hyperjeff.net/reference/CocoaArticles.php?cat=3
http://www.allosx.com/996343557/index_html
Search this forum for past answers to your question.
http://cocoa.mamasam.com
A quick google search often provides great information.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.