r/ObjectiveC • u/BlockOfDiamond • Aug 25 '22
alloc method and insufficient memory
In C malloc can fail if there is not enough memory in the system. What happens if I try [NSObject alloc] while there is no memory available? Does it abort? Return NULL?
10
Upvotes
View all comments
Show parent comment
1
u/quaderrordemonstand May 31 '24
Oh right. https://www.independent.co.uk/extras/indybest/fashion-beauty/hair/best-split-end-treatment-hair-b1804245.html
BTW, the question doesn't specify iOS.