Obj-C / Cocoa : Way to store temporary data during runtime
-
07-03-2021 - |
문제
Back in C I had a custom black red tree implementation to store/insert/search/etc a high range of data structs during runtime, I'd like to ask how this is done in objective-c/cocoa, for example, is there a built-in functionality similar to this in some framework?
Thank you for your time.
해결책
You can surely use your custom black red tree implementation in Objective-C.
More in general, I don't know of any "native" black red tree implementation in Objective C, but I would simply take a C one, put an ObjC wrapper around it if you wish to make it reference-counting-aware, and go with it.
You could also check CHDataStructures, which includes a nice collection of ObjC data structures (they also have search trees, though I don't know it that would be black red tree).