Wednesday, September 25, 2013

pointer being freed was not allocated

2012-08-16 18:19:44.069 CT10000-GD [474:707] sqlite storage path is / var/mobile/Applications/96C35662-B6F3-468C-80DB-CDE7C8A16A34/Documents/UserBehavior.sqlite
2012-08-16 18:19:44.356 CT10000-GD [474:707] call initializeDestroyInfo
CT10000-GD (474,0 x3f3b0d98) malloc: *** error for object 0x7330f20a: pointer being freed was not allocated
*** Set a breakpoint in malloc_error_break to debug,,
  void FreeAddresses ()  {  int i;  for (i = 0; i   

The above is method FreeAddresses;


Problem:
1 This error how to solve? Literally see the release time is already empty, the release of a null pointer, but I have judged already, why would an error?
2 Look at the picture, do people know java, java error, eclipse will tell us is that line being given, the above process diagram is not telling me the wrong way in FreeAddresses it?
3.pointer being freed was not allocated, will also throw in what circumstances?

Waiting for you to help, beginner iphone
Reply:
It is said that iphone programming, the memory management difficult, study. . .
Reply:
! = 0 now! = NULL should lacks distinction it, do not repeat the decision
After another free, ip_addrs [i] = 0 is cleared, but if_names, hw_addrs not, may still be released again, unless you ensure FreeAddresses called only once

No comments:

Post a Comment