Question: In my android application I have a listview with a bunch of items with checkboxes. If the checkboxes are checked, a value is calculated. However, after the application is terminated, the listview resets itself, with all checkboxes being unticked again. How would I have it so when the application is completely terminated, the checkboxes checked/unchecked states are saved? I've looked up various methods but all seem rather complicated for a beginner :(

Answer: 
NSArrays expect to hold objective-C objects conforming to the `NSObject` protocol. If you wish to wrap a pointer, use NSValue:

```
[myArray insertObject:[NSValue valueWithPointer:node] atIndex:idx];

```

You are manually responsible for all memory management of that pointer, as objective-C can't reference count it in the usual way.
`NSMurableArray` only accepts Objective-C objects (hence the argument type of `addObject:` being `id`).

Are you on the Mac or iOS? If you're on the Mac, You might want to look at `NSPointerArray`.

You might also be able to be `CFMutableArray` with custom callback functions, but I haven't tried this myself.