How to make an mutable C array for this data type?

Posted by mystify on Stack Overflow See other posts from Stack Overflow or by mystify
Published on 2010-05-04T19:35:53Z Indexed on 2010/05/04 19:38 UTC
Read the original article Hit count: 136

Filed under:
|
|

There's this instance variable in my objective-c class:

ALuint source;

I need to have an mutable array of OpenAL Sources, so in this case probably I need a mutable C-array.

But how would I create one? There are many questions regarding that:

1) How to create an mutable C-array?

2) How to add something to that mutable C-array?

3) How to remove something from that mutable C-array?

4) What memory management pitfalls must I be aware of? Must i free() it in my -dealloc method?

And yes, I think this is something for the nice community wiki...

© Stack Overflow or respective owner

Related posts about c

    Related posts about objective-c