• 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
controller layer crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

controller layer crash


  • Subject: controller layer crash
  • From: Olivier Destrebecq <email@hidden>
  • Date: Mon, 28 Jun 2004 12:23:05 -0400

I have a document based application. The document nib is loaded when i
create the window controller and the window controller is the owner of
the nib. In that nib i have to array controller whose content array is
set to an array contained by an object which is itself contained by the
window controller. Everything seem to work fine except when the dealloc
method is called. The first array is released fine and the second cause
a crash.

I release the array using the accessors: [self set<key>: nil];
and the set<key> method is this:
if( objectiveCClasses != _objectiveCClasses ){
[ (objectiveCProject*) [[self undoManager]
prepareWithInvocationTarget:self] setObjectiveCClasses:
_objectiveCClasses];
[_objectiveCClasses release];
_objectiveCClasses = [objectiveCClasses retain];
// Add user code here if required:
[self didChange];

two of those are called in a row on different member of the class. The
second call always crash. If i change the order of those two calls, it
still crash ont he second call.

If i replace the setters call with direct variable release ([<key>
release]), then everythin works fine.

Any idea of what i'm doing wrong? Can't i use the setter method to
release the variable? I was kind o liking this as this way teh variable
can be released in one and only one place.

Olivier Destrebecq
http://www-personal.si.umich.edu/~olivier/portfolio/Resume.html
_______________________________________________
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: Tab View Delegate
  • Next by Date: large type effect howto?
  • Previous by thread: Re: Tab View Delegate
  • Next by thread: large type effect howto?
  • Index(es):
    • Date
    • Thread