Closed garettbass closed 5 months ago
Whoopsie, that must have been a copy paste error (in sokol_gfx.h it's correct. It's a bit strange that clang doesn't warn when a struct with ObjC references is erased via memset).
Even when wrong the current behaviour doesn't do harm, because the struct is only cleared on entry and exit, but we should fix it properly by moving the _SAPP_CLEAR_ARC_STRUCT
macro below the platform defines.
I can do a quick fix in the evening. Thanks for making me aware of that!
The conditional block that defines
_SAPP_CLEAR_ARC_STRUCT
checksdefined(_SAPP_MACOS) || defined(_SAPP_IOS)
before those macros are defined:As a result, it looks like
_SAPP_CLEAR_ARC_STRUCT
is always defined as:If this is behaving correctly, perhaps we can remove the other conditional definitions? Happy to make this change, just uncertain what the correct result should be.