I'm using objc_[sg]etAssociatedObject()
, and this function uses a memory address as a key. If I pass the same string literal - e.g. "UIImageForTexture"
- into the function from two different files, will the two string literals have:
- the same memory address?
- different memory addresses?
- it depends on some other factors.
- it's undefined.
I can do this more explicitly by sticking the literal in a file somewhere and referring to it via an extern
but I'd like to know if I can avoid having to do that.