The example code "Handling a Complex Multi-Touch Sequence" in the Event Handling section of the iPhone Application Programming Guide provides an incomplete example that assumes the reader knows enough fill-in the blanks. I know enough to know that I don't know enough to do that without some clarification.
In Listing 3-6, I assume touchBeginPoints
is a member property of type CFDictionaryRef
. Correct?
In that same example, we're using malloc()
so I assume we need to call free()
at some later point. My question is what am I freeing and when? Should I free()
the individual points in touchesEnded:
/touchesCancelled:
? How would I do that? (I assume I need to read up on enumerating CFDictionaryRef
) Or would I free(touchBeginPoints);
in my dealloc:
method?
Finally, in Listing 3-7 there is a compareAddress:
method. How (and where) would I implement that?
Update Found the answer to the last one.