On Oct 7, 2010, at 11:30 AM, nicolas berloquin wrote: >> >>> I turned on zombies, and I checked with the debugger, and the textLabel's >>> _text is the deallocated instance >>> (myName.titre is good). >> >> This may be a red herring as the state of _text should not effect the >> ability to assign the property value, generally speaking. > > Unless they compare the strings before they replace them which is what they > seem to do. > > I have changed my code to do a copy o the string before I assign it to the > label and it works. What I don't understand is why the API doesn't either > retain or copy it !! >
It probably does (and so needs to send a release to the old value). What is likely happening is that you've got your memory management screwed up somewhere, and are over-releasing the (what will be the old) string value, which causes the text fields text ivar to point to garbage. Glenn Andreas [email protected] The most merciful thing in the world ... is the inability of the human mind to correlate all its contents - HPL _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
