cacao icon indicating copy to clipboard operation
cacao copied to clipboard

Story for unowned pointers in collections

Open agg23 opened this issue 11 months ago • 8 comments

Both of the collection types (NSArray and NSMutableDictionary) only accept owned pointers to elements. This makes sense, but there are many types that are always shared (NSURL, NSImage, etc), which means we cannot store these elements in any collections. This prevents using some APIs and just generally is a bit weird.

Why are those types always unowned, and what would need to happen in order to properly add them to a collection without leaking?

agg23 avatar Jul 20 '23 16:07 agg23