Skip to content

Fix GL objects not getting GC'd on HL#2039

Merged
dimensionscape merged 1 commit intoopenfl:developfrom
ACrazyTown:fix/hl-gl-gc
Mar 9, 2026
Merged

Fix GL objects not getting GC'd on HL#2039
dimensionscape merged 1 commit intoopenfl:developfrom
ACrazyTown:fix/hl-gl-gc

Conversation

@ACrazyTown
Copy link
Contributor

On Hashlink, prior to this change, no OpenGL objects would be cleaned up by the GC.

This was caused because the object was keyed by its void* pointer, but the finalizer would receive a HL_CFFIPointer* and thus the map check would fail. To fix it I added a HL specific GC method that takes in a HL_CFFIPointer* and then retrieves the actual object pointer, to use for the map checks.

@dimensionscape dimensionscape merged commit 9aceb5b into openfl:develop Mar 9, 2026
32 checks passed
@joshtynjala
Copy link
Member

Good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants