mixing a custom class with CoreFoundation

Discussion in 'Mac Programming' started by wrjohns, May 5, 2009.

  1. wrjohns macrumors newbie

    May 4, 2009
    Is it possible to use a CF object to store a collection of class instances?

    The documentation has a good example on defining callbacks to work with user-defined stuctures. But say, instead of a structure, I wanted to use a class?

    I'd like to use CFBinaryHeap in conjunction with an NSObject subclass. Not sure if/how this is possible.
  2. kpua macrumors 6502

    Jul 25, 2006
    Yes, this will work just fine. Foundation and CF are 'bridged' for all NSObjects for retain counting. This is critical because the Foundation collections are implemented by the CF ones.

Share This Page