ebitengine / purego

Apache License 2.0
1.95k stars 63 forks source link

objc: add safe Objc Classes #160

Closed TotallyGamerJet closed 10 months ago

TotallyGamerJet commented 10 months ago

(now actually safe)

The issued lied in two areas. One, for loop variables take the address instead of copying the memory and taking that address. This should be fixed in 1.22. The second area of issues was caused by memory corruption occurring due to calling C functions inside of closures.

I've tested this PR with ebitengine and all tested passed on amd64 & arm64 darwin.

Closes #143

hajimehoshi commented 10 months ago

I'll take a look again tomorrow. Good night!