Any or both of these date pointers require [release] when I am done with them. How do I know this? I am not sure, since I am not doing init explicitly.
NSDate *date = [NSDate date]; NSDate *date = [dateWithTimeIntervalSince1970:100000000];
Both are auto-implemented, that is, you do not need to release them yourself. A rule of thumb is that you own the object if you send + alloc or -copy or explicitly save it:
If you have an object, you must free it. + new is a shortcut for + alloc and -init.
, . , , , , , .
, , CARN. in Cocoa/Cocoa , Copy, Alloc, Retain New , , - . , , +1. , , "" , .
, .
Source: https://habr.com/ru/post/1731217/More articles:scanf () discards the first result depending on the order of the variable declaration - cClipboard Copy-Paste does not work in service on Win Server 2008 / Vista 64bit - clipboardDoes anyone know a way to easily convert PDF to docx programmatically - c #What is an XPS file structure - data-structuresHow to check SQL queries and ensure their quality? - sqlAny way to get a File object from a JAR - javaXPS or XAML for embedding in a .NET application? - xamlGreat area for choosing radio - jqueryIs there a better way to convert from decimal to binary in python? - pythonТеги html отображаются в Firefox - htmlAll Articles