• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTimer and messages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: weird screen saver problem
  • Next by Date: Re: What is the maximum size of an NSString?
  • Previous by thread: NSTimer and messages
  • Next by thread: Max size of an NSString
  • Index(es):
    • Date
    • Thread