0

If i open my video record app for an half hour automatically crashes happen in ios6 for both ipad and iPhone. when i see debug navigator window it shows automatically increase memory size by +1 for every second , is there any solution to solve this.

falcon143
  • 702
  • 4
  • 19
  • 2
    check this Apple's Doc https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/MemoryMgmt.html – Mohit Jul 30 '14 at 05:41
  • and also check this tutorial http://www.raywenderlich.com/2657/memory-management-tutorial-for-ios – Mohit Jul 30 '14 at 05:41
  • @MohitPopat these are for `NON-ARC` but what about `ARC`. – falcon143 Jul 30 '14 at 05:48
  • for `ARC` http://www.techrepublic.com/blog/software-engineer/understand-memory-management-under-arc/ – Mohit Jul 30 '14 at 05:55

1 Answers1

2

Using retain and release to manage our memory uses a model called reference counting. Each object has a retain count and this is used to keep track of ownership.

Once an object’s retain count is reduced to zero, it is deallocated.

  • alloc - allocates memory for new object with retain count of 1.
  • retain - increments retain count of object by 1.
  • release - decrements retain count by 1.
  • autorelease - decrements retain count by 1 at the end of the current autorelease pool block.
  • copy - creates copy of object with retain count of 1.

P.S.: I'd suggest using ARC.

falcon143
  • 702
  • 4
  • 19
Sviatoslav Yakymiv
  • 7,887
  • 2
  • 23
  • 43