Iphone memory leak with malloc

Posted by Icky on Stack Overflow See other posts from Stack Overflow or by Icky
Published on 2010-04-14T16:12:17Z Indexed on 2010/04/14 16:13 UTC
Read the original article Hit count: 202

Hello.

I have memory leak, found by instruments and it is supposed to be in this line of code:

indices = malloc( sizeof(indices[0]) * totalQuads * 6);

This is actually a code snippet from a tutorial, something which i think is leak-free so to say. Now I reckon, the error is somewhere else, but I do not know, where.

These are the last trackbacks:

5 ColorRun -[EAGLView initWithCoder:] /Users/thomaskopinski/programming/colorrun_3.26/Classes/EAGLView.m:98
4 ColorRun -[EAGLView initGame] /Users/thomaskopinski/programming/colorrun_3.26/Classes/EAGLView.m:201
3 ColorRun -[SpriteSheet initWithImageNamed:spriteWidth:spriteHeight:spacing:imageScale:] /Users/thomaskopinski/programming/colorrun_3.26/SpriteSheet.m:68
2 ColorRun -[Image initWithImage:scale:] /Users/thomaskopinski/programming/colorrun_3.26/Image.m:122
1 ColorRun -[Image initImpl] /Users/thomaskopinski/programming/colorrun_3.26/Image.m:158
0 libSystem.B.dylib malloc

Does anyone know how to approach this?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about memory-leaks