git » sdk » commit 4b03032

Retain the elements, not the whole array repeatedly

author Stephen Paul Weber
2024-10-17 04:55:45 UTC
committer Stephen Paul Weber
2024-10-17 04:55:45 UTC
parent d68d4fd82ea6c4ab85dce8cbddd2c28a2d7c3b0e

Retain the elements, not the whole array repeatedly

HaxeCBridge.hx +1 -1

diff --git a/HaxeCBridge.hx b/HaxeCBridge.hx
index 1733b76..b34d65d 100644
--- a/HaxeCBridge.hx
+++ b/HaxeCBridge.hx
@@ -1881,7 +1881,7 @@ abstract HaxeArray<T>(cpp.RawPointer<cpp.RawPointer<cpp.Void>>) from cpp.RawPoin
 	@:from
 	public static inline function fromArrayT<T>(x: Array<T>): HaxeArray<HaxeObject<T>> {
 		for (el in x) {
-			HaxeCBridge.retainHaxeObject(x);
+			HaxeCBridge.retainHaxeObject(el);
 		}
 		return HaxeCBridge.retainHaxeArray(x);
 	}