Explorar el Código

Proper garbage collection for JavaScript bindings

Ivan Safrin hace 9 años
padre
commit
feeae8c67c
Se han modificado 100 ficheros con 599 adiciones y 152 borrados
  1. 6 0
      bindings/javascript/Polycode/AABB.js
  2. 6 0
      bindings/javascript/Polycode/AttributeBinding.js
  3. 6 0
      bindings/javascript/Polycode/AudioMixer.js
  4. 6 0
      bindings/javascript/Polycode/AudioStreamingSource.js
  5. 6 0
      bindings/javascript/Polycode/BezierCurve.js
  6. 6 0
      bindings/javascript/Polycode/BezierPoint.js
  7. 6 0
      bindings/javascript/Polycode/BinaryObjectReader.js
  8. 6 0
      bindings/javascript/Polycode/BinaryObjectWriter.js
  9. 6 0
      bindings/javascript/Polycode/Bone.js
  10. 6 0
      bindings/javascript/Polycode/BoneTrack.js
  11. 6 0
      bindings/javascript/Polycode/Color.js
  12. 6 0
      bindings/javascript/Polycode/ColorRange.js
  13. 6 0
      bindings/javascript/Polycode/Config.js
  14. 6 0
      bindings/javascript/Polycode/ConfigEntry.js
  15. 6 0
      bindings/javascript/Polycode/Core.js
  16. 6 0
      bindings/javascript/Polycode/CoreFileExtension.js
  17. 6 0
      bindings/javascript/Polycode/CoreInput.js
  18. 6 0
      bindings/javascript/Polycode/CoreMotionEvent.js
  19. 6 0
      bindings/javascript/Polycode/CoreMutex.js
  20. 6 0
      bindings/javascript/Polycode/CoreServices.js
  21. 6 0
      bindings/javascript/Polycode/Data.js
  22. 6 0
      bindings/javascript/Polycode/DebugBackTraceEntry.js
  23. 6 0
      bindings/javascript/Polycode/DummyCore.js
  24. 6 0
      bindings/javascript/Polycode/EntityProp.js
  25. 6 0
      bindings/javascript/Polycode/Event.js
  26. 6 0
      bindings/javascript/Polycode/EventDispatcher.js
  27. 6 0
      bindings/javascript/Polycode/EventHandler.js
  28. 6 0
      bindings/javascript/Polycode/Font.js
  29. 6 0
      bindings/javascript/Polycode/FontResourceLoader.js
  30. 6 0
      bindings/javascript/Polycode/GPUDrawBuffer.js
  31. 6 0
      bindings/javascript/Polycode/GPUDrawCall.js
  32. 6 0
      bindings/javascript/Polycode/GPUDrawOptions.js
  33. 6 0
      bindings/javascript/Polycode/GlyphData.js
  34. 6 0
      bindings/javascript/Polycode/InputEvent.js
  35. 6 13
      bindings/javascript/Polycode/JSScriptInstance.js
  36. 6 0
      bindings/javascript/Polycode/JoystickInfo.js
  37. 6 0
      bindings/javascript/Polycode/Label.js
  38. 6 0
      bindings/javascript/Polycode/LightInfo.js
  39. 6 0
      bindings/javascript/Polycode/LightInfoBinding.js
  40. 6 0
      bindings/javascript/Polycode/LightShadowInfoBinding.js
  41. 6 11
      bindings/javascript/Polycode/LocalShaderParam.js
  42. 6 0
      bindings/javascript/Polycode/LuaScriptInstance.js
  43. 0 11
      bindings/javascript/Polycode/Material.js
  44. 6 0
      bindings/javascript/Polycode/MaterialManager.js
  45. 6 0
      bindings/javascript/Polycode/MaterialResourceLoader.js
  46. 6 0
      bindings/javascript/Polycode/Matrix4.js
  47. 6 0
      bindings/javascript/Polycode/MeshResourceLoader.js
  48. 6 0
      bindings/javascript/Polycode/MouseEventResult.js
  49. 6 0
      bindings/javascript/Polycode/OSFileEntry.js
  50. 6 0
      bindings/javascript/Polycode/ObjectEntry.js
  51. 6 0
      bindings/javascript/Polycode/Perlin.js
  52. 6 11
      bindings/javascript/Polycode/PolycodeViewBase.js
  53. 7 12
      bindings/javascript/Polycode/ProgramAttribute.js
  54. 6 11
      bindings/javascript/Polycode/ProgramParam.js
  55. 6 0
      bindings/javascript/Polycode/ProgramResourceLoader.js
  56. 6 0
      bindings/javascript/Polycode/QuatTriple.js
  57. 6 0
      bindings/javascript/Polycode/Quaternion.js
  58. 6 0
      bindings/javascript/Polycode/QuaternionCurve.js
  59. 6 0
      bindings/javascript/Polycode/Ray.js
  60. 6 0
      bindings/javascript/Polycode/Rectangle.js
  61. 7 23
      bindings/javascript/Polycode/RenderBuffer.js
  62. 7 12
      bindings/javascript/Polycode/RenderDataArray.js
  63. 6 13
      bindings/javascript/Polycode/RenderFrame.js
  64. 6 0
      bindings/javascript/Polycode/RenderTargetBinding.js
  65. 6 0
      bindings/javascript/Polycode/RenderThread.js
  66. 6 0
      bindings/javascript/Polycode/RenderThreadDebugInfo.js
  67. 6 0
      bindings/javascript/Polycode/Renderer.js
  68. 7 23
      bindings/javascript/Polycode/RendererThreadJob.js
  69. 7 12
      bindings/javascript/Polycode/Resource.js
  70. 6 0
      bindings/javascript/Polycode/ResourceManager.js
  71. 6 0
      bindings/javascript/Polycode/ResourcePool.js
  72. 6 0
      bindings/javascript/Polycode/Rotation.js
  73. 6 0
      bindings/javascript/Polycode/SceneCurve.js
  74. 6 0
      bindings/javascript/Polycode/SceneEntityInstanceLayer.js
  75. 6 0
      bindings/javascript/Polycode/SceneEntityInstanceResourceEntry.js
  76. 6 0
      bindings/javascript/Polycode/SceneManager.js
  77. 6 0
      bindings/javascript/Polycode/SceneParticle.js
  78. 6 0
      bindings/javascript/Polycode/SceneRenderTexture.js
  79. 6 0
      bindings/javascript/Polycode/SceneSoundListener.js
  80. 6 0
      bindings/javascript/Polycode/ScriptInstance.js
  81. 6 0
      bindings/javascript/Polycode/ScriptResourceLoader.js
  82. 6 0
      bindings/javascript/Polycode/Shader.js
  83. 6 0
      bindings/javascript/Polycode/ShaderBinding.js
  84. 6 0
      bindings/javascript/Polycode/ShaderPass.js
  85. 6 0
      bindings/javascript/Polycode/ShaderProgram.js
  86. 6 0
      bindings/javascript/Polycode/ShaderRenderTarget.js
  87. 6 0
      bindings/javascript/Polycode/Skeleton.js
  88. 6 0
      bindings/javascript/Polycode/SkeletonAnimation.js
  89. 6 0
      bindings/javascript/Polycode/Sound.js
  90. 6 0
      bindings/javascript/Polycode/SoundManager.js
  91. 6 0
      bindings/javascript/Polycode/Sprite.js
  92. 6 0
      bindings/javascript/Polycode/SpriteFrame.js
  93. 6 0
      bindings/javascript/Polycode/SpriteSet.js
  94. 6 0
      bindings/javascript/Polycode/SpriteState.js
  95. 6 0
      bindings/javascript/Polycode/String.js
  96. 6 0
      bindings/javascript/Polycode/TextureResourceLoader.js
  97. 6 0
      bindings/javascript/Polycode/TimeInfo.js
  98. 6 0
      bindings/javascript/Polycode/Timer.js
  99. 6 0
      bindings/javascript/Polycode/TouchInfo.js
  100. 6 0
      bindings/javascript/Polycode/Vector2.js

+ 6 - 0
bindings/javascript/Polycode/AABB.js

@@ -24,3 +24,9 @@ AABB.prototype.__set_max = function(val) {
 	Polycode.AABB__set_max(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(AABB.prototype, function (x) {
+	if (x === AABB.prototype) {
+		return;
+	}
+	Polycode.AABB__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/AttributeBinding.js

@@ -42,3 +42,9 @@ AttributeBinding.prototype.__set_enabled = function(val) {
 	Polycode.AttributeBinding__set_enabled(this.__ptr, val)
 }
 
+Duktape.fin(AttributeBinding.prototype, function (x) {
+	if (x === AttributeBinding.prototype) {
+		return;
+	}
+	Polycode.AttributeBinding__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/AudioMixer.js

@@ -22,6 +22,12 @@ AudioMixer.prototype.__set_mixerMutex = function(val) {
 	Polycode.AudioMixer__set_mixerMutex(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(AudioMixer.prototype, function (x) {
+	if (x === AudioMixer.prototype) {
+		return;
+	}
+	Polycode.AudioMixer__delete(x.__ptr)
+})
 
 AudioMixer.prototype.mixIntoBuffer = function(buffer,numSamples) {
 	Polycode.AudioMixer_mixIntoBuffer(this.__ptr, buffer,numSamples)

+ 6 - 0
bindings/javascript/Polycode/AudioStreamingSource.js

@@ -1,5 +1,11 @@
 function AudioStreamingSource() {
 }
+Duktape.fin(AudioStreamingSource.prototype, function (x) {
+	if (x === AudioStreamingSource.prototype) {
+		return;
+	}
+	Polycode.AudioStreamingSource__delete(x.__ptr)
+})
 
 AudioStreamingSource.prototype.getNumChannels = function() {
 	return Polycode.AudioStreamingSource_getNumChannels(this.__ptr)

+ 6 - 0
bindings/javascript/Polycode/BezierCurve.js

@@ -22,6 +22,12 @@ BezierCurve.prototype.__set_evaluationAccuracy = function(val) {
 	Polycode.BezierCurve__set_evaluationAccuracy(this.__ptr, val)
 }
 
+Duktape.fin(BezierCurve.prototype, function (x) {
+	if (x === BezierCurve.prototype) {
+		return;
+	}
+	Polycode.BezierCurve__delete(x.__ptr)
+})
 
 BezierCurve.prototype.getControlPoint = function(index) {
 	var retVal = new BezierPoint()

+ 6 - 0
bindings/javascript/Polycode/BezierPoint.js

@@ -35,3 +35,9 @@ BezierPoint.prototype.__set_p3 = function(val) {
 	Polycode.BezierPoint__set_p3(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(BezierPoint.prototype, function (x) {
+	if (x === BezierPoint.prototype) {
+		return;
+	}
+	Polycode.BezierPoint__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/BinaryObjectReader.js

@@ -11,3 +11,9 @@ BinaryObjectReader.prototype.__set_success = function(val) {
 	Polycode.BinaryObjectReader__set_success(this.__ptr, val)
 }
 
+Duktape.fin(BinaryObjectReader.prototype, function (x) {
+	if (x === BinaryObjectReader.prototype) {
+		return;
+	}
+	Polycode.BinaryObjectReader__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/BinaryObjectWriter.js

@@ -1,5 +1,11 @@
 function BinaryObjectWriter() {
 }
+Duktape.fin(BinaryObjectWriter.prototype, function (x) {
+	if (x === BinaryObjectWriter.prototype) {
+		return;
+	}
+	Polycode.BinaryObjectWriter__delete(x.__ptr)
+})
 
 BinaryObjectWriter.prototype.parseKeysFromObjectEntry = function(entry) {
 	Polycode.BinaryObjectWriter_parseKeysFromObjectEntry(this.__ptr, entry)

+ 6 - 0
bindings/javascript/Polycode/Bone.js

@@ -97,6 +97,12 @@ Bone.prototype.__set_disableAnimation = function(val) {
 	Polycode.Bone__set_disableAnimation(this.__ptr, val)
 }
 
+Duktape.fin(Bone.prototype, function (x) {
+	if (x === Bone.prototype) {
+		return;
+	}
+	Polycode.Bone__delete(x.__ptr)
+})
 
 Bone.prototype.getName = function() {
 	return Polycode.Bone_getName(this.__ptr)

+ 6 - 0
bindings/javascript/Polycode/BoneTrack.js

@@ -165,6 +165,12 @@ BoneTrack.prototype.__set_weight = function(val) {
 	Polycode.BoneTrack__set_weight(this.__ptr, val)
 }
 
+Duktape.fin(BoneTrack.prototype, function (x) {
+	if (x === BoneTrack.prototype) {
+		return;
+	}
+	Polycode.BoneTrack__delete(x.__ptr)
+})
 
 BoneTrack.prototype.Play = function(once) {
 	Polycode.BoneTrack_Play(this.__ptr, once)

+ 6 - 0
bindings/javascript/Polycode/Color.js

@@ -38,6 +38,12 @@ Color.prototype.__set_a = function(val) {
 	Polycode.Color__set_a(this.__ptr, val)
 }
 
+Duktape.fin(Color.prototype, function (x) {
+	if (x === Color.prototype) {
+		return;
+	}
+	Polycode.Color__delete(x.__ptr)
+})
 
 Color.prototype.setColorHex = function(hex) {
 	Polycode.Color_setColorHex(this.__ptr, hex)

+ 6 - 0
bindings/javascript/Polycode/ColorRange.js

@@ -31,3 +31,9 @@ ColorRange.prototype.__set_rangeEnd = function(val) {
 	Polycode.ColorRange__set_rangeEnd(this.__ptr, val)
 }
 
+Duktape.fin(ColorRange.prototype, function (x) {
+	if (x === ColorRange.prototype) {
+		return;
+	}
+	Polycode.ColorRange__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/Config.js

@@ -1,5 +1,11 @@
 function Config() {
 }
+Duktape.fin(Config.prototype, function (x) {
+	if (x === Config.prototype) {
+		return;
+	}
+	Polycode.Config__delete(x.__ptr)
+})
 
 Config.prototype.loadConfig = function(configNamespace,fileName) {
 	Polycode.Config_loadConfig(this.__ptr, configNamespace,fileName)

+ 6 - 0
bindings/javascript/Polycode/ConfigEntry.js

@@ -47,3 +47,9 @@ ConfigEntry.prototype.__set_isString = function(val) {
 	Polycode.ConfigEntry__set_isString(this.__ptr, val)
 }
 
+Duktape.fin(ConfigEntry.prototype, function (x) {
+	if (x === ConfigEntry.prototype) {
+		return;
+	}
+	Polycode.ConfigEntry__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/Core.js

@@ -60,6 +60,12 @@ Core.prototype.__set_deviceAttitude = function(val) {
 	Polycode.Core__set_deviceAttitude(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(Core.prototype, function (x) {
+	if (x === Core.prototype) {
+		return;
+	}
+	Polycode.Core__delete(x.__ptr)
+})
 
 Core.prototype.Update = function() {
 	return Polycode.Core_Update(this.__ptr)

+ 6 - 0
bindings/javascript/Polycode/CoreFileExtension.js

@@ -20,3 +20,9 @@ CoreFileExtension.prototype.__set_description = function(val) {
 	Polycode.CoreFileExtension__set_description(this.__ptr, val)
 }
 
+Duktape.fin(CoreFileExtension.prototype, function (x) {
+	if (x === CoreFileExtension.prototype) {
+		return;
+	}
+	Polycode.CoreFileExtension__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/CoreInput.js

@@ -69,6 +69,12 @@ CoreInput.prototype.__set_deltaMousePosition = function(val) {
 	Polycode.CoreInput__set_deltaMousePosition(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(CoreInput.prototype, function (x) {
+	if (x === CoreInput.prototype) {
+		return;
+	}
+	Polycode.CoreInput__delete(x.__ptr)
+})
 
 CoreInput.prototype.getMousePosition = function() {
 	var retVal = new Vector2()

+ 6 - 0
bindings/javascript/Polycode/CoreMotionEvent.js

@@ -13,3 +13,9 @@ CoreMotionEvent.prototype.__set_amount = function(val) {
 	Polycode.CoreMotionEvent__set_amount(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(CoreMotionEvent.prototype, function (x) {
+	if (x === CoreMotionEvent.prototype) {
+		return;
+	}
+	Polycode.CoreMotionEvent__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/CoreMutex.js

@@ -11,6 +11,12 @@ CoreMutex.prototype.__set_mutexID = function(val) {
 	Polycode.CoreMutex__set_mutexID(this.__ptr, val)
 }
 
+Duktape.fin(CoreMutex.prototype, function (x) {
+	if (x === CoreMutex.prototype) {
+		return;
+	}
+	Polycode.CoreMutex__delete(x.__ptr)
+})
 
 CoreMutex.prototype.lock = function() {
 	Polycode.CoreMutex_lock(this.__ptr)

+ 6 - 0
bindings/javascript/Polycode/CoreServices.js

@@ -1,5 +1,11 @@
 function CoreServices() {
 }
+Duktape.fin(CoreServices.prototype, function (x) {
+	if (x === CoreServices.prototype) {
+		return;
+	}
+	Polycode.CoreServices__delete(x.__ptr)
+})
 
 CoreServices.prototype.setRenderer = function(renderer) {
 	Polycode.CoreServices_setRenderer(this.__ptr, renderer)

+ 6 - 0
bindings/javascript/Polycode/Data.js

@@ -1,5 +1,11 @@
 function Data() {
 }
+Duktape.fin(Data.prototype, function (x) {
+	if (x === Data.prototype) {
+		return;
+	}
+	Polycode.Data__delete(x.__ptr)
+})
 
 Data.prototype.loadFromFile = function(fileName) {
 	return Polycode.Data_loadFromFile(this.__ptr, fileName)

+ 6 - 0
bindings/javascript/Polycode/DebugBackTraceEntry.js

@@ -20,3 +20,9 @@ DebugBackTraceEntry.prototype.__set_lineNumber = function(val) {
 	Polycode.DebugBackTraceEntry__set_lineNumber(this.__ptr, val)
 }
 
+Duktape.fin(DebugBackTraceEntry.prototype, function (x) {
+	if (x === DebugBackTraceEntry.prototype) {
+		return;
+	}
+	Polycode.DebugBackTraceEntry__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/DummyCore.js

@@ -1,5 +1,11 @@
 function DummyCore() {
 }
+Duktape.fin(DummyCore.prototype, function (x) {
+	if (x === DummyCore.prototype) {
+		return;
+	}
+	Polycode.DummyCore__delete(x.__ptr)
+})
 
 DummyCore.prototype.Render = function() {
 	Polycode.DummyCore_Render(this.__ptr)

+ 6 - 0
bindings/javascript/Polycode/EntityProp.js

@@ -20,3 +20,9 @@ EntityProp.prototype.__set_propValue = function(val) {
 	Polycode.EntityProp__set_propValue(this.__ptr, val)
 }
 
+Duktape.fin(EntityProp.prototype, function (x) {
+	if (x === EntityProp.prototype) {
+		return;
+	}
+	Polycode.EntityProp__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/Event.js

@@ -20,6 +20,12 @@ Event.prototype.__set_cancelEventFlag = function(val) {
 	Polycode.Event__set_cancelEventFlag(this.__ptr, val)
 }
 
+Duktape.fin(Event.prototype, function (x) {
+	if (x === Event.prototype) {
+		return;
+	}
+	Polycode.Event__delete(x.__ptr)
+})
 
 Event.prototype.getEventCode = function() {
 	return Polycode.Event_getEventCode(this.__ptr)

+ 6 - 0
bindings/javascript/Polycode/EventDispatcher.js

@@ -1,5 +1,11 @@
 function EventDispatcher() {
 }
+Duktape.fin(EventDispatcher.prototype, function (x) {
+	if (x === EventDispatcher.prototype) {
+		return;
+	}
+	Polycode.EventDispatcher__delete(x.__ptr)
+})
 
 EventDispatcher.prototype.removeAllHandlers = function() {
 	Polycode.EventDispatcher_removeAllHandlers(this.__ptr)

+ 6 - 0
bindings/javascript/Polycode/EventHandler.js

@@ -1,2 +1,8 @@
 function EventHandler() {
 }
+Duktape.fin(EventHandler.prototype, function (x) {
+	if (x === EventHandler.prototype) {
+		return;
+	}
+	Polycode.EventHandler__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/Font.js

@@ -11,6 +11,12 @@ Font.prototype.__set_loaded = function(val) {
 	Polycode.Font__set_loaded(this.__ptr, val)
 }
 
+Duktape.fin(Font.prototype, function (x) {
+	if (x === Font.prototype) {
+		return;
+	}
+	Polycode.Font__delete(x.__ptr)
+})
 
 Font.prototype.getFace = function() {
 	var retVal = new FT_Face()

+ 6 - 0
bindings/javascript/Polycode/FontResourceLoader.js

@@ -1,5 +1,11 @@
 function FontResourceLoader() {
 }
+Duktape.fin(FontResourceLoader.prototype, function (x) {
+	if (x === FontResourceLoader.prototype) {
+		return;
+	}
+	Polycode.FontResourceLoader__delete(x.__ptr)
+})
 
 FontResourceLoader.prototype.loadResource = function(path,targetPool) {
 	var retVal = new Resource()

+ 6 - 0
bindings/javascript/Polycode/GPUDrawBuffer.js

@@ -108,3 +108,9 @@ GPUDrawBuffer.prototype.__set_viewport = function(val) {
 	Polycode.GPUDrawBuffer__set_viewport(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(GPUDrawBuffer.prototype, function (x) {
+	if (x === GPUDrawBuffer.prototype) {
+		return;
+	}
+	Polycode.GPUDrawBuffer__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/GPUDrawCall.js

@@ -46,3 +46,9 @@ GPUDrawCall.prototype.__set_material = function(val) {
 	Polycode.GPUDrawCall__set_material(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(GPUDrawCall.prototype, function (x) {
+	if (x === GPUDrawCall.prototype) {
+		return;
+	}
+	Polycode.GPUDrawCall__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/GPUDrawOptions.js

@@ -105,3 +105,9 @@ GPUDrawOptions.prototype.__set_drawColor = function(val) {
 	Polycode.GPUDrawOptions__set_drawColor(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(GPUDrawOptions.prototype, function (x) {
+	if (x === GPUDrawOptions.prototype) {
+		return;
+	}
+	Polycode.GPUDrawOptions__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/GlyphData.js

@@ -44,6 +44,12 @@ GlyphData.prototype.__set_trailingAdvance = function(val) {
 	Polycode.GlyphData__set_trailingAdvance(this.__ptr, val)
 }
 
+Duktape.fin(GlyphData.prototype, function (x) {
+	if (x === GlyphData.prototype) {
+		return;
+	}
+	Polycode.GlyphData__delete(x.__ptr)
+})
 
 GlyphData.prototype.clearData = function() {
 	Polycode.GlyphData_clearData(this.__ptr)

+ 6 - 0
bindings/javascript/Polycode/InputEvent.js

@@ -125,6 +125,12 @@ InputEvent.prototype.__set_hitDistance = function(val) {
 	Polycode.InputEvent__set_hitDistance(this.__ptr, val)
 }
 
+Duktape.fin(InputEvent.prototype, function (x) {
+	if (x === InputEvent.prototype) {
+		return;
+	}
+	Polycode.InputEvent__delete(x.__ptr)
+})
 
 InputEvent.prototype.getMousePosition = function() {
 	var retVal = new Vector2()

+ 6 - 13
bindings/javascript/Polycode/JSScriptInstance.js

@@ -1,15 +1,8 @@
 function JSScriptInstance() {
-	Object.defineProperties(this, {
-		'objectRef': { enumerable: true, configurable: true, get: JSScriptInstance.prototype.__get_objectRef, set: JSScriptInstance.prototype.__set_objectRef}
-	})
 }
-JSScriptInstance.prototype.__get_objectRef = function() {
-	var retVal = new void()
-	retVal.__ptr = 	Polycode.JSScriptInstance__get_objectRef(this.__ptr)
-	return retVal
-}
-
-JSScriptInstance.prototype.__set_objectRef = function(val) {
-	Polycode.JSScriptInstance__set_objectRef(this.__ptr, val.__ptr)
-}
-
+Duktape.fin(JSScriptInstance.prototype, function (x) {
+	if (x === JSScriptInstance.prototype) {
+		return;
+	}
+	Polycode.JSScriptInstance__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/JoystickInfo.js

@@ -20,3 +20,9 @@ JoystickInfo.prototype.__set_deviceIndex = function(val) {
 	Polycode.JoystickInfo__set_deviceIndex(this.__ptr, val)
 }
 
+Duktape.fin(JoystickInfo.prototype, function (x) {
+	if (x === JoystickInfo.prototype) {
+		return;
+	}
+	Polycode.JoystickInfo__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/Label.js

@@ -1,5 +1,11 @@
 function Label() {
 }
+Duktape.fin(Label.prototype, function (x) {
+	if (x === Label.prototype) {
+		return;
+	}
+	Polycode.Label__delete(x.__ptr)
+})
 
 Label.prototype.setText = function(text) {
 	Polycode.Label_setText(this.__ptr, text)

+ 6 - 0
bindings/javascript/Polycode/LightInfo.js

@@ -149,3 +149,9 @@ LightInfo.prototype.__set_lightViewMatrix = function(val) {
 	Polycode.LightInfo__set_lightViewMatrix(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(LightInfo.prototype, function (x) {
+	if (x === LightInfo.prototype) {
+		return;
+	}
+	Polycode.LightInfo__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/LightInfoBinding.js

@@ -112,3 +112,9 @@ LightInfoBinding.prototype.__set_shadowEnabled = function(val) {
 	Polycode.LightInfoBinding__set_shadowEnabled(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(LightInfoBinding.prototype, function (x) {
+	if (x === LightInfoBinding.prototype) {
+		return;
+	}
+	Polycode.LightInfoBinding__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/LightShadowInfoBinding.js

@@ -24,3 +24,9 @@ LightShadowInfoBinding.prototype.__set_shadowBuffer = function(val) {
 	Polycode.LightShadowInfoBinding__set_shadowBuffer(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(LightShadowInfoBinding.prototype, function (x) {
+	if (x === LightShadowInfoBinding.prototype) {
+		return;
+	}
+	Polycode.LightShadowInfoBinding__delete(x.__ptr)
+})

+ 6 - 11
bindings/javascript/Polycode/LocalShaderParam.js

@@ -1,7 +1,6 @@
 function LocalShaderParam() {
 	Object.defineProperties(this, {
 		'name': { enumerable: true, configurable: true, get: LocalShaderParam.prototype.__get_name, set: LocalShaderParam.prototype.__set_name},
-		'data': { enumerable: true, configurable: true, get: LocalShaderParam.prototype.__get_data, set: LocalShaderParam.prototype.__set_data},
 		'type': { enumerable: true, configurable: true, get: LocalShaderParam.prototype.__get_type, set: LocalShaderParam.prototype.__set_type},
 		'ownsPointer': { enumerable: true, configurable: true, get: LocalShaderParam.prototype.__get_ownsPointer, set: LocalShaderParam.prototype.__set_ownsPointer},
 		'arraySize': { enumerable: true, configurable: true, get: LocalShaderParam.prototype.__get_arraySize, set: LocalShaderParam.prototype.__set_arraySize},
@@ -16,16 +15,6 @@ LocalShaderParam.prototype.__set_name = function(val) {
 	Polycode.LocalShaderParam__set_name(this.__ptr, val)
 }
 
-LocalShaderParam.prototype.__get_data = function() {
-	var retVal = new void()
-	retVal.__ptr = 	Polycode.LocalShaderParam__get_data(this.__ptr)
-	return retVal
-}
-
-LocalShaderParam.prototype.__set_data = function(val) {
-	Polycode.LocalShaderParam__set_data(this.__ptr, val.__ptr)
-}
-
 LocalShaderParam.prototype.__get_type = function() {
 	return Polycode.LocalShaderParam__get_type(this.__ptr)
 }
@@ -60,6 +49,12 @@ LocalShaderParam.prototype.__set_param = function(val) {
 	Polycode.LocalShaderParam__set_param(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(LocalShaderParam.prototype, function (x) {
+	if (x === LocalShaderParam.prototype) {
+		return;
+	}
+	Polycode.LocalShaderParam__delete(x.__ptr)
+})
 
 LocalShaderParam.prototype.Copy = function() {
 	var retVal = new LocalShaderParam()

+ 6 - 0
bindings/javascript/Polycode/LuaScriptInstance.js

@@ -11,3 +11,9 @@ LuaScriptInstance.prototype.__set_tableRef = function(val) {
 	Polycode.LuaScriptInstance__set_tableRef(this.__ptr, val)
 }
 
+Duktape.fin(LuaScriptInstance.prototype, function (x) {
+	if (x === LuaScriptInstance.prototype) {
+		return;
+	}
+	Polycode.LuaScriptInstance__delete(x.__ptr)
+})

+ 0 - 11
bindings/javascript/Polycode/Material.js

@@ -1,7 +1,6 @@
 function Material() {
 	Object.defineProperties(this, {
 		'fp16RenderTargets': { enumerable: true, configurable: true, get: Material.prototype.__get_fp16RenderTargets, set: Material.prototype.__set_fp16RenderTargets},
-		'shaderModule': { enumerable: true, configurable: true, get: Material.prototype.__get_shaderModule, set: Material.prototype.__set_shaderModule},
 		'blendingMode': { enumerable: true, configurable: true, get: Material.prototype.__get_blendingMode, set: Material.prototype.__set_blendingMode},
 		'screenMaterial': { enumerable: true, configurable: true, get: Material.prototype.__get_screenMaterial, set: Material.prototype.__set_screenMaterial}
 	})
@@ -14,16 +13,6 @@ Material.prototype.__set_fp16RenderTargets = function(val) {
 	Polycode.Material__set_fp16RenderTargets(this.__ptr, val)
 }
 
-Material.prototype.__get_shaderModule = function() {
-	var retVal = new void()
-	retVal.__ptr = 	Polycode.Material__get_shaderModule(this.__ptr)
-	return retVal
-}
-
-Material.prototype.__set_shaderModule = function(val) {
-	Polycode.Material__set_shaderModule(this.__ptr, val.__ptr)
-}
-
 Material.prototype.__get_blendingMode = function() {
 	return Polycode.Material__get_blendingMode(this.__ptr)
 }

+ 6 - 0
bindings/javascript/Polycode/MaterialManager.js

@@ -38,6 +38,12 @@ MaterialManager.prototype.__set_keepTextureData = function(val) {
 	Polycode.MaterialManager__set_keepTextureData(this.__ptr, val)
 }
 
+Duktape.fin(MaterialManager.prototype, function (x) {
+	if (x === MaterialManager.prototype) {
+		return;
+	}
+	Polycode.MaterialManager__delete(x.__ptr)
+})
 
 MaterialManager.prototype.Update = function(elapsed) {
 	Polycode.MaterialManager_Update(this.__ptr, elapsed)

+ 6 - 0
bindings/javascript/Polycode/MaterialResourceLoader.js

@@ -1,5 +1,11 @@
 function MaterialResourceLoader() {
 }
+Duktape.fin(MaterialResourceLoader.prototype, function (x) {
+	if (x === MaterialResourceLoader.prototype) {
+		return;
+	}
+	Polycode.MaterialResourceLoader__delete(x.__ptr)
+})
 
 MaterialResourceLoader.prototype.loadResource = function(path,targetPool) {
 	var retVal = new Resource()

+ 6 - 0
bindings/javascript/Polycode/Matrix4.js

@@ -1,5 +1,11 @@
 function Matrix4() {
 }
+Duktape.fin(Matrix4.prototype, function (x) {
+	if (x === Matrix4.prototype) {
+		return;
+	}
+	Polycode.Matrix4__delete(x.__ptr)
+})
 
 Matrix4.prototype.identity = function() {
 	Polycode.Matrix4_identity(this.__ptr)

+ 6 - 0
bindings/javascript/Polycode/MeshResourceLoader.js

@@ -1,5 +1,11 @@
 function MeshResourceLoader() {
 }
+Duktape.fin(MeshResourceLoader.prototype, function (x) {
+	if (x === MeshResourceLoader.prototype) {
+		return;
+	}
+	Polycode.MeshResourceLoader__delete(x.__ptr)
+})
 
 MeshResourceLoader.prototype.loadResource = function(path,targetPool) {
 	var retVal = new Resource()

+ 6 - 0
bindings/javascript/Polycode/MouseEventResult.js

@@ -20,3 +20,9 @@ MouseEventResult.prototype.__set_blocked = function(val) {
 	Polycode.MouseEventResult__set_blocked(this.__ptr, val)
 }
 
+Duktape.fin(MouseEventResult.prototype, function (x) {
+	if (x === MouseEventResult.prototype) {
+		return;
+	}
+	Polycode.MouseEventResult__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/OSFileEntry.js

@@ -56,6 +56,12 @@ OSFileEntry.prototype.__set_type = function(val) {
 	Polycode.OSFileEntry__set_type(this.__ptr, val)
 }
 
+Duktape.fin(OSFileEntry.prototype, function (x) {
+	if (x === OSFileEntry.prototype) {
+		return;
+	}
+	Polycode.OSFileEntry__delete(x.__ptr)
+})
 
 OSFileEntry.prototype.init = function(path,name,type) {
 	Polycode.OSFileEntry_init(this.__ptr, path,name,type)

+ 6 - 0
bindings/javascript/Polycode/ObjectEntry.js

@@ -65,6 +65,12 @@ ObjectEntry.prototype.__set_length = function(val) {
 	Polycode.ObjectEntry__set_length(this.__ptr, val)
 }
 
+Duktape.fin(ObjectEntry.prototype, function (x) {
+	if (x === ObjectEntry.prototype) {
+		return;
+	}
+	Polycode.ObjectEntry__delete(x.__ptr)
+})
 
 ObjectEntry.prototype.readNumber = function(key,out) {
 	return Polycode.ObjectEntry_readNumber(this.__ptr, key,out)

+ 6 - 0
bindings/javascript/Polycode/Perlin.js

@@ -1,5 +1,11 @@
 function Perlin() {
 }
+Duktape.fin(Perlin.prototype, function (x) {
+	if (x === Perlin.prototype) {
+		return;
+	}
+	Polycode.Perlin__delete(x.__ptr)
+})
 
 Perlin.prototype.Get2DTiledX = function(x,y,t) {
 	return Polycode.Perlin_Get2DTiledX(this.__ptr, x,y,t)

+ 6 - 11
bindings/javascript/Polycode/PolycodeViewBase.js

@@ -1,19 +1,8 @@
 function PolycodeViewBase() {
 	Object.defineProperties(this, {
-		'windowData': { enumerable: true, configurable: true, get: PolycodeViewBase.prototype.__get_windowData, set: PolycodeViewBase.prototype.__set_windowData},
 		'resizable': { enumerable: true, configurable: true, get: PolycodeViewBase.prototype.__get_resizable, set: PolycodeViewBase.prototype.__set_resizable}
 	})
 }
-PolycodeViewBase.prototype.__get_windowData = function() {
-	var retVal = new void()
-	retVal.__ptr = 	Polycode.PolycodeViewBase__get_windowData(this.__ptr)
-	return retVal
-}
-
-PolycodeViewBase.prototype.__set_windowData = function(val) {
-	Polycode.PolycodeViewBase__set_windowData(this.__ptr, val.__ptr)
-}
-
 PolycodeViewBase.prototype.__get_resizable = function() {
 	return Polycode.PolycodeViewBase__get_resizable(this.__ptr)
 }
@@ -22,3 +11,9 @@ PolycodeViewBase.prototype.__set_resizable = function(val) {
 	Polycode.PolycodeViewBase__set_resizable(this.__ptr, val)
 }
 
+Duktape.fin(PolycodeViewBase.prototype, function (x) {
+	if (x === PolycodeViewBase.prototype) {
+		return;
+	}
+	Polycode.PolycodeViewBase__delete(x.__ptr)
+})

+ 7 - 12
bindings/javascript/Polycode/ProgramAttribute.js

@@ -1,8 +1,7 @@
 function ProgramAttribute() {
 	Object.defineProperties(this, {
 		'size': { enumerable: true, configurable: true, get: ProgramAttribute.prototype.__get_size, set: ProgramAttribute.prototype.__set_size},
-		'name': { enumerable: true, configurable: true, get: ProgramAttribute.prototype.__get_name, set: ProgramAttribute.prototype.__set_name},
-		'platformData': { enumerable: true, configurable: true, get: ProgramAttribute.prototype.__get_platformData, set: ProgramAttribute.prototype.__set_platformData}
+		'name': { enumerable: true, configurable: true, get: ProgramAttribute.prototype.__get_name, set: ProgramAttribute.prototype.__set_name}
 	})
 }
 ProgramAttribute.prototype.__get_size = function() {
@@ -21,13 +20,9 @@ ProgramAttribute.prototype.__set_name = function(val) {
 	Polycode.ProgramAttribute__set_name(this.__ptr, val)
 }
 
-ProgramAttribute.prototype.__get_platformData = function() {
-	var retVal = new void()
-	retVal.__ptr = 	Polycode.ProgramAttribute__get_platformData(this.__ptr)
-	return retVal
-}
-
-ProgramAttribute.prototype.__set_platformData = function(val) {
-	Polycode.ProgramAttribute__set_platformData(this.__ptr, val.__ptr)
-}
-
+Duktape.fin(ProgramAttribute.prototype, function (x) {
+	if (x === ProgramAttribute.prototype) {
+		return;
+	}
+	Polycode.ProgramAttribute__delete(x.__ptr)
+})

+ 6 - 11
bindings/javascript/Polycode/ProgramParam.js

@@ -2,7 +2,6 @@ function ProgramParam() {
 	Object.defineProperties(this, {
 		'name': { enumerable: true, configurable: true, get: ProgramParam.prototype.__get_name, set: ProgramParam.prototype.__set_name},
 		'type': { enumerable: true, configurable: true, get: ProgramParam.prototype.__get_type, set: ProgramParam.prototype.__set_type},
-		'platformData': { enumerable: true, configurable: true, get: ProgramParam.prototype.__get_platformData, set: ProgramParam.prototype.__set_platformData},
 		'globalParam': { enumerable: true, configurable: true, get: ProgramParam.prototype.__get_globalParam, set: ProgramParam.prototype.__set_globalParam}
 	})
 }
@@ -22,16 +21,6 @@ ProgramParam.prototype.__set_type = function(val) {
 	Polycode.ProgramParam__set_type(this.__ptr, val)
 }
 
-ProgramParam.prototype.__get_platformData = function() {
-	var retVal = new void()
-	retVal.__ptr = 	Polycode.ProgramParam__get_platformData(this.__ptr)
-	return retVal
-}
-
-ProgramParam.prototype.__set_platformData = function(val) {
-	Polycode.ProgramParam__set_platformData(this.__ptr, val.__ptr)
-}
-
 ProgramParam.prototype.__get_globalParam = function() {
 	var retVal = new LocalShaderParam()
 	retVal.__ptr = 	Polycode.ProgramParam__get_globalParam(this.__ptr)
@@ -42,3 +31,9 @@ ProgramParam.prototype.__set_globalParam = function(val) {
 	Polycode.ProgramParam__set_globalParam(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(ProgramParam.prototype, function (x) {
+	if (x === ProgramParam.prototype) {
+		return;
+	}
+	Polycode.ProgramParam__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/ProgramResourceLoader.js

@@ -1,5 +1,11 @@
 function ProgramResourceLoader() {
 }
+Duktape.fin(ProgramResourceLoader.prototype, function (x) {
+	if (x === ProgramResourceLoader.prototype) {
+		return;
+	}
+	Polycode.ProgramResourceLoader__delete(x.__ptr)
+})
 
 ProgramResourceLoader.prototype.loadResource = function(path,targetPool) {
 	var retVal = new Resource()

+ 6 - 0
bindings/javascript/Polycode/QuatTriple.js

@@ -44,3 +44,9 @@ QuatTriple.prototype.__set_time = function(val) {
 	Polycode.QuatTriple__set_time(this.__ptr, val)
 }
 
+Duktape.fin(QuatTriple.prototype, function (x) {
+	if (x === QuatTriple.prototype) {
+		return;
+	}
+	Polycode.QuatTriple__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/Quaternion.js

@@ -38,6 +38,12 @@ Quaternion.prototype.__set_w = function(val) {
 	Polycode.Quaternion__set_w(this.__ptr, val)
 }
 
+Duktape.fin(Quaternion.prototype, function (x) {
+	if (x === Quaternion.prototype) {
+		return;
+	}
+	Polycode.Quaternion__delete(x.__ptr)
+})
 
 Quaternion.prototype.setFromMatrix = function(_mat) {
 	Polycode.Quaternion_setFromMatrix(this.__ptr, _mat)

+ 6 - 0
bindings/javascript/Polycode/QuaternionCurve.js

@@ -1,5 +1,11 @@
 function QuaternionCurve() {
 }
+Duktape.fin(QuaternionCurve.prototype, function (x) {
+	if (x === QuaternionCurve.prototype) {
+		return;
+	}
+	Polycode.QuaternionCurve__delete(x.__ptr)
+})
 
 QuaternionCurve.prototype.interpolate = function(t,useShortestPath) {
 	var retVal = new Quaternion()

+ 6 - 0
bindings/javascript/Polycode/Ray.js

@@ -35,6 +35,12 @@ Ray.prototype.__set_inv_direction = function(val) {
 	Polycode.Ray__set_inv_direction(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(Ray.prototype, function (x) {
+	if (x === Ray.prototype) {
+		return;
+	}
+	Polycode.Ray__delete(x.__ptr)
+})
 
 Ray.prototype.boxIntersect = function(box,transformMatrix,near,far) {
 	return Polycode.Ray_boxIntersect(this.__ptr, box,transformMatrix,near,far)

+ 6 - 0
bindings/javascript/Polycode/Rectangle.js

@@ -38,6 +38,12 @@ Rectangle.prototype.__set_h = function(val) {
 	Polycode.Rectangle__set_h(this.__ptr, val)
 }
 
+Duktape.fin(Rectangle.prototype, function (x) {
+	if (x === Rectangle.prototype) {
+		return;
+	}
+	Polycode.Rectangle__delete(x.__ptr)
+})
 
 Rectangle.prototype.setRect = function(x,y,w,h) {
 	Polycode.Rectangle_setRect(this.__ptr, x,y,w,h)

+ 7 - 23
bindings/javascript/Polycode/RenderBuffer.js

@@ -1,9 +1,7 @@
 function RenderBuffer() {
 	Object.defineProperties(this, {
 		'colorTexture': { enumerable: true, configurable: true, get: RenderBuffer.prototype.__get_colorTexture, set: RenderBuffer.prototype.__set_colorTexture},
-		'depthTexture': { enumerable: true, configurable: true, get: RenderBuffer.prototype.__get_depthTexture, set: RenderBuffer.prototype.__set_depthTexture},
-		'platformData': { enumerable: true, configurable: true, get: RenderBuffer.prototype.__get_platformData, set: RenderBuffer.prototype.__set_platformData},
-		'depthBufferPlatformData': { enumerable: true, configurable: true, get: RenderBuffer.prototype.__get_depthBufferPlatformData, set: RenderBuffer.prototype.__set_depthBufferPlatformData}
+		'depthTexture': { enumerable: true, configurable: true, get: RenderBuffer.prototype.__get_depthTexture, set: RenderBuffer.prototype.__set_depthTexture}
 	})
 }
 RenderBuffer.prototype.__get_colorTexture = function() {
@@ -26,26 +24,12 @@ RenderBuffer.prototype.__set_depthTexture = function(val) {
 	Polycode.RenderBuffer__set_depthTexture(this.__ptr, val.__ptr)
 }
 
-RenderBuffer.prototype.__get_platformData = function() {
-	var retVal = new void()
-	retVal.__ptr = 	Polycode.RenderBuffer__get_platformData(this.__ptr)
-	return retVal
-}
-
-RenderBuffer.prototype.__set_platformData = function(val) {
-	Polycode.RenderBuffer__set_platformData(this.__ptr, val.__ptr)
-}
-
-RenderBuffer.prototype.__get_depthBufferPlatformData = function() {
-	var retVal = new void()
-	retVal.__ptr = 	Polycode.RenderBuffer__get_depthBufferPlatformData(this.__ptr)
-	return retVal
-}
-
-RenderBuffer.prototype.__set_depthBufferPlatformData = function(val) {
-	Polycode.RenderBuffer__set_depthBufferPlatformData(this.__ptr, val.__ptr)
-}
-
+Duktape.fin(RenderBuffer.prototype, function (x) {
+	if (x === RenderBuffer.prototype) {
+		return;
+	}
+	Polycode.RenderBuffer__delete(x.__ptr)
+})
 
 RenderBuffer.prototype.getWidth = function() {
 	return Polycode.RenderBuffer_getWidth(this.__ptr)

+ 7 - 12
bindings/javascript/Polycode/RenderDataArray.js

@@ -2,8 +2,7 @@ function RenderDataArray() {
 	Object.defineProperties(this, {
 		'type': { enumerable: true, configurable: true, get: RenderDataArray.prototype.__get_type, set: RenderDataArray.prototype.__set_type},
 		'customArrayName': { enumerable: true, configurable: true, get: RenderDataArray.prototype.__get_customArrayName, set: RenderDataArray.prototype.__set_customArrayName},
-		'hasVBO': { enumerable: true, configurable: true, get: RenderDataArray.prototype.__get_hasVBO, set: RenderDataArray.prototype.__set_hasVBO},
-		'platformData': { enumerable: true, configurable: true, get: RenderDataArray.prototype.__get_platformData, set: RenderDataArray.prototype.__set_platformData}
+		'hasVBO': { enumerable: true, configurable: true, get: RenderDataArray.prototype.__get_hasVBO, set: RenderDataArray.prototype.__set_hasVBO}
 	})
 }
 RenderDataArray.prototype.__get_type = function() {
@@ -30,16 +29,12 @@ RenderDataArray.prototype.__set_hasVBO = function(val) {
 	Polycode.RenderDataArray__set_hasVBO(this.__ptr, val)
 }
 
-RenderDataArray.prototype.__get_platformData = function() {
-	var retVal = new void()
-	retVal.__ptr = 	Polycode.RenderDataArray__get_platformData(this.__ptr)
-	return retVal
-}
-
-RenderDataArray.prototype.__set_platformData = function(val) {
-	Polycode.RenderDataArray__set_platformData(this.__ptr, val.__ptr)
-}
-
+Duktape.fin(RenderDataArray.prototype, function (x) {
+	if (x === RenderDataArray.prototype) {
+		return;
+	}
+	Polycode.RenderDataArray__delete(x.__ptr)
+})
 
 RenderDataArray.prototype.getArrayData = function() {
 	Polycode.RenderDataArray_getArrayData(this.__ptr)

+ 6 - 13
bindings/javascript/Polycode/RenderFrame.js

@@ -1,15 +1,8 @@
 function RenderFrame() {
-	Object.defineProperties(this, {
-		'jobQueue': { enumerable: true, configurable: true, get: RenderFrame.prototype.__get_jobQueue, set: RenderFrame.prototype.__set_jobQueue}
-	})
 }
-RenderFrame.prototype.__get_jobQueue = function() {
-	var retVal = new queue<RendererThreadJob>()
-	retVal.__ptr = 	Polycode.RenderFrame__get_jobQueue(this.__ptr)
-	return retVal
-}
-
-RenderFrame.prototype.__set_jobQueue = function(val) {
-	Polycode.RenderFrame__set_jobQueue(this.__ptr, val.__ptr)
-}
-
+Duktape.fin(RenderFrame.prototype, function (x) {
+	if (x === RenderFrame.prototype) {
+		return;
+	}
+	Polycode.RenderFrame__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/RenderTargetBinding.js

@@ -40,3 +40,9 @@ RenderTargetBinding.prototype.__set_buffer = function(val) {
 	Polycode.RenderTargetBinding__set_buffer(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(RenderTargetBinding.prototype, function (x) {
+	if (x === RenderTargetBinding.prototype) {
+		return;
+	}
+	Polycode.RenderTargetBinding__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/RenderThread.js

@@ -1,5 +1,11 @@
 function RenderThread() {
 }
+Duktape.fin(RenderThread.prototype, function (x) {
+	if (x === RenderThread.prototype) {
+		return;
+	}
+	Polycode.RenderThread__delete(x.__ptr)
+})
 
 RenderThread.prototype.setGraphicsInterface = function(core,graphicsInterface) {
 	Polycode.RenderThread_setGraphicsInterface(this.__ptr, core,graphicsInterface)

+ 6 - 0
bindings/javascript/Polycode/RenderThreadDebugInfo.js

@@ -29,3 +29,9 @@ RenderThreadDebugInfo.prototype.__set_timeTaken = function(val) {
 	Polycode.RenderThreadDebugInfo__set_timeTaken(this.__ptr, val)
 }
 
+Duktape.fin(RenderThreadDebugInfo.prototype, function (x) {
+	if (x === RenderThreadDebugInfo.prototype) {
+		return;
+	}
+	Polycode.RenderThreadDebugInfo__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/Renderer.js

@@ -1,5 +1,11 @@
 function Renderer() {
 }
+Duktape.fin(Renderer.prototype, function (x) {
+	if (x === Renderer.prototype) {
+		return;
+	}
+	Polycode.Renderer__delete(x.__ptr)
+})
 
 Renderer.prototype.setGraphicsInterface = function(core,graphicsInterface) {
 	Polycode.Renderer_setGraphicsInterface(this.__ptr, core,graphicsInterface)

+ 7 - 23
bindings/javascript/Polycode/RendererThreadJob.js

@@ -1,8 +1,6 @@
 function RendererThreadJob() {
 	Object.defineProperties(this, {
-		'jobType': { enumerable: true, configurable: true, get: RendererThreadJob.prototype.__get_jobType, set: RendererThreadJob.prototype.__set_jobType},
-		'data': { enumerable: true, configurable: true, get: RendererThreadJob.prototype.__get_data, set: RendererThreadJob.prototype.__set_data},
-		'data2': { enumerable: true, configurable: true, get: RendererThreadJob.prototype.__get_data2, set: RendererThreadJob.prototype.__set_data2}
+		'jobType': { enumerable: true, configurable: true, get: RendererThreadJob.prototype.__get_jobType, set: RendererThreadJob.prototype.__set_jobType}
 	})
 }
 RendererThreadJob.prototype.__get_jobType = function() {
@@ -13,23 +11,9 @@ RendererThreadJob.prototype.__set_jobType = function(val) {
 	Polycode.RendererThreadJob__set_jobType(this.__ptr, val)
 }
 
-RendererThreadJob.prototype.__get_data = function() {
-	var retVal = new void()
-	retVal.__ptr = 	Polycode.RendererThreadJob__get_data(this.__ptr)
-	return retVal
-}
-
-RendererThreadJob.prototype.__set_data = function(val) {
-	Polycode.RendererThreadJob__set_data(this.__ptr, val.__ptr)
-}
-
-RendererThreadJob.prototype.__get_data2 = function() {
-	var retVal = new void()
-	retVal.__ptr = 	Polycode.RendererThreadJob__get_data2(this.__ptr)
-	return retVal
-}
-
-RendererThreadJob.prototype.__set_data2 = function(val) {
-	Polycode.RendererThreadJob__set_data2(this.__ptr, val.__ptr)
-}
-
+Duktape.fin(RendererThreadJob.prototype, function (x) {
+	if (x === RendererThreadJob.prototype) {
+		return;
+	}
+	Polycode.RendererThreadJob__delete(x.__ptr)
+})

+ 7 - 12
bindings/javascript/Polycode/Resource.js

@@ -1,8 +1,7 @@
 function Resource() {
 	Object.defineProperties(this, {
 		'reloadOnFileModify': { enumerable: true, configurable: true, get: Resource.prototype.__get_reloadOnFileModify, set: Resource.prototype.__set_reloadOnFileModify},
-		'resourceFileTime': { enumerable: true, configurable: true, get: Resource.prototype.__get_resourceFileTime, set: Resource.prototype.__set_resourceFileTime},
-		'platformData': { enumerable: true, configurable: true, get: Resource.prototype.__get_platformData, set: Resource.prototype.__set_platformData}
+		'resourceFileTime': { enumerable: true, configurable: true, get: Resource.prototype.__get_resourceFileTime, set: Resource.prototype.__set_resourceFileTime}
 	})
 }
 Resource.prototype.__get_reloadOnFileModify = function() {
@@ -23,16 +22,12 @@ Resource.prototype.__set_resourceFileTime = function(val) {
 	Polycode.Resource__set_resourceFileTime(this.__ptr, val.__ptr)
 }
 
-Resource.prototype.__get_platformData = function() {
-	var retVal = new void()
-	retVal.__ptr = 	Polycode.Resource__get_platformData(this.__ptr)
-	return retVal
-}
-
-Resource.prototype.__set_platformData = function(val) {
-	Polycode.Resource__set_platformData(this.__ptr, val.__ptr)
-}
-
+Duktape.fin(Resource.prototype, function (x) {
+	if (x === Resource.prototype) {
+		return;
+	}
+	Polycode.Resource__delete(x.__ptr)
+})
 
 Resource.prototype.reloadResource = function() {
 	Polycode.Resource_reloadResource(this.__ptr)

+ 6 - 0
bindings/javascript/Polycode/ResourceManager.js

@@ -1,5 +1,11 @@
 function ResourceManager() {
 }
+Duktape.fin(ResourceManager.prototype, function (x) {
+	if (x === ResourceManager.prototype) {
+		return;
+	}
+	Polycode.ResourceManager__delete(x.__ptr)
+})
 
 ResourceManager.prototype.getGlobalPool = function() {
 	var retVal = new ResourcePool()

+ 6 - 0
bindings/javascript/Polycode/ResourcePool.js

@@ -38,6 +38,12 @@ ResourcePool.prototype.__set_deleteOnUnsubscribe = function(val) {
 	Polycode.ResourcePool__set_deleteOnUnsubscribe(this.__ptr, val)
 }
 
+Duktape.fin(ResourcePool.prototype, function (x) {
+	if (x === ResourcePool.prototype) {
+		return;
+	}
+	Polycode.ResourcePool__delete(x.__ptr)
+})
 
 ResourcePool.prototype.setFallbackPool = function(pool) {
 	Polycode.ResourcePool_setFallbackPool(this.__ptr, pool)

+ 6 - 0
bindings/javascript/Polycode/Rotation.js

@@ -29,3 +29,9 @@ Rotation.prototype.__set_roll = function(val) {
 	Polycode.Rotation__set_roll(this.__ptr, val)
 }
 
+Duktape.fin(Rotation.prototype, function (x) {
+	if (x === Rotation.prototype) {
+		return;
+	}
+	Polycode.Rotation__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/SceneCurve.js

@@ -20,6 +20,12 @@ SceneCurve.prototype.__set_curveResolution = function(val) {
 	Polycode.SceneCurve__set_curveResolution(this.__ptr, val)
 }
 
+Duktape.fin(SceneCurve.prototype, function (x) {
+	if (x === SceneCurve.prototype) {
+		return;
+	}
+	Polycode.SceneCurve__delete(x.__ptr)
+})
 
 SceneCurve.prototype.getWorldPointAt = function(t) {
 	var retVal = new Vector3()

+ 6 - 0
bindings/javascript/Polycode/SceneEntityInstanceLayer.js

@@ -42,6 +42,12 @@ SceneEntityInstanceLayer.prototype.__set_instance = function(val) {
 	Polycode.SceneEntityInstanceLayer__set_instance(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(SceneEntityInstanceLayer.prototype, function (x) {
+	if (x === SceneEntityInstanceLayer.prototype) {
+		return;
+	}
+	Polycode.SceneEntityInstanceLayer__delete(x.__ptr)
+})
 
 SceneEntityInstanceLayer.prototype.setLayerVisibility = function(val) {
 	Polycode.SceneEntityInstanceLayer_setLayerVisibility(this.__ptr, val)

+ 6 - 0
bindings/javascript/Polycode/SceneEntityInstanceResourceEntry.js

@@ -1,5 +1,11 @@
 function SceneEntityInstanceResourceEntry() {
 }
+Duktape.fin(SceneEntityInstanceResourceEntry.prototype, function (x) {
+	if (x === SceneEntityInstanceResourceEntry.prototype) {
+		return;
+	}
+	Polycode.SceneEntityInstanceResourceEntry__delete(x.__ptr)
+})
 
 SceneEntityInstanceResourceEntry.prototype.getInstance = function() {
 	var retVal = new SceneEntityInstance()

+ 6 - 0
bindings/javascript/Polycode/SceneManager.js

@@ -1,5 +1,11 @@
 function SceneManager() {
 }
+Duktape.fin(SceneManager.prototype, function (x) {
+	if (x === SceneManager.prototype) {
+		return;
+	}
+	Polycode.SceneManager__delete(x.__ptr)
+})
 
 SceneManager.prototype.addScene = function(newScene) {
 	Polycode.SceneManager_addScene(this.__ptr, newScene)

+ 6 - 0
bindings/javascript/Polycode/SceneParticle.js

@@ -93,3 +93,9 @@ SceneParticle.prototype.__set_varianceIndex = function(val) {
 	Polycode.SceneParticle__set_varianceIndex(this.__ptr, val)
 }
 
+Duktape.fin(SceneParticle.prototype, function (x) {
+	if (x === SceneParticle.prototype) {
+		return;
+	}
+	Polycode.SceneParticle__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/SceneRenderTexture.js

@@ -11,6 +11,12 @@ SceneRenderTexture.prototype.__set_enabled = function(val) {
 	Polycode.SceneRenderTexture__set_enabled(this.__ptr, val)
 }
 
+Duktape.fin(SceneRenderTexture.prototype, function (x) {
+	if (x === SceneRenderTexture.prototype) {
+		return;
+	}
+	Polycode.SceneRenderTexture__delete(x.__ptr)
+})
 
 SceneRenderTexture.prototype.getTargetTexture = function() {
 	var retVal = new Texture()

+ 6 - 0
bindings/javascript/Polycode/SceneSoundListener.js

@@ -1,5 +1,11 @@
 function SceneSoundListener() {
 }
+Duktape.fin(SceneSoundListener.prototype, function (x) {
+	if (x === SceneSoundListener.prototype) {
+		return;
+	}
+	Polycode.SceneSoundListener__delete(x.__ptr)
+})
 
 SceneSoundListener.prototype.Update = function() {
 	Polycode.SceneSoundListener_Update(this.__ptr)

+ 6 - 0
bindings/javascript/Polycode/ScriptInstance.js

@@ -13,3 +13,9 @@ ScriptInstance.prototype.__set_script = function(val) {
 	Polycode.ScriptInstance__set_script(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(ScriptInstance.prototype, function (x) {
+	if (x === ScriptInstance.prototype) {
+		return;
+	}
+	Polycode.ScriptInstance__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/ScriptResourceLoader.js

@@ -1,5 +1,11 @@
 function ScriptResourceLoader() {
 }
+Duktape.fin(ScriptResourceLoader.prototype, function (x) {
+	if (x === ScriptResourceLoader.prototype) {
+		return;
+	}
+	Polycode.ScriptResourceLoader__delete(x.__ptr)
+})
 
 ScriptResourceLoader.prototype.loadResource = function(path,targetPool) {
 	var retVal = new Resource()

+ 6 - 0
bindings/javascript/Polycode/Shader.js

@@ -60,6 +60,12 @@ Shader.prototype.__set_name = function(val) {
 	Polycode.Shader__set_name(this.__ptr, val)
 }
 
+Duktape.fin(Shader.prototype, function (x) {
+	if (x === Shader.prototype) {
+		return;
+	}
+	Polycode.Shader__delete(x.__ptr)
+})
 
 Shader.prototype.getType = function() {
 	return Polycode.Shader_getType(this.__ptr)

+ 6 - 0
bindings/javascript/Polycode/ShaderBinding.js

@@ -33,6 +33,12 @@ ShaderBinding.prototype.__set_accessMutex = function(val) {
 	Polycode.ShaderBinding__set_accessMutex(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(ShaderBinding.prototype, function (x) {
+	if (x === ShaderBinding.prototype) {
+		return;
+	}
+	Polycode.ShaderBinding__delete(x.__ptr)
+})
 
 ShaderBinding.prototype.copyTo = function(targetBinding) {
 	Polycode.ShaderBinding_copyTo(this.__ptr, targetBinding)

+ 6 - 0
bindings/javascript/Polycode/ShaderPass.js

@@ -53,6 +53,12 @@ ShaderPass.prototype.__set_materialShaderBinding = function(val) {
 	Polycode.ShaderPass__set_materialShaderBinding(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(ShaderPass.prototype, function (x) {
+	if (x === ShaderPass.prototype) {
+		return;
+	}
+	Polycode.ShaderPass__delete(x.__ptr)
+})
 
 ShaderPass.prototype.setAttributeArraysFromMesh = function(mesh) {
 	Polycode.ShaderPass_setAttributeArraysFromMesh(this.__ptr, mesh)

+ 6 - 0
bindings/javascript/Polycode/ShaderProgram.js

@@ -11,6 +11,12 @@ ShaderProgram.prototype.__set_type = function(val) {
 	Polycode.ShaderProgram__set_type(this.__ptr, val)
 }
 
+Duktape.fin(ShaderProgram.prototype, function (x) {
+	if (x === ShaderProgram.prototype) {
+		return;
+	}
+	Polycode.ShaderProgram__delete(x.__ptr)
+})
 
 ShaderProgram.prototype.reloadProgram = function() {
 	Polycode.ShaderProgram_reloadProgram(this.__ptr)

+ 6 - 0
bindings/javascript/Polycode/ShaderRenderTarget.js

@@ -67,3 +67,9 @@ ShaderRenderTarget.prototype.__set_normalizedHeight = function(val) {
 	Polycode.ShaderRenderTarget__set_normalizedHeight(this.__ptr, val)
 }
 
+Duktape.fin(ShaderRenderTarget.prototype, function (x) {
+	if (x === ShaderRenderTarget.prototype) {
+		return;
+	}
+	Polycode.ShaderRenderTarget__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/Skeleton.js

@@ -1,5 +1,11 @@
 function Skeleton() {
 }
+Duktape.fin(Skeleton.prototype, function (x) {
+	if (x === Skeleton.prototype) {
+		return;
+	}
+	Polycode.Skeleton__delete(x.__ptr)
+})
 
 Skeleton.prototype.loadSkeleton = function(fileName) {
 	Polycode.Skeleton_loadSkeleton(this.__ptr, fileName)

+ 6 - 0
bindings/javascript/Polycode/SkeletonAnimation.js

@@ -1,5 +1,11 @@
 function SkeletonAnimation() {
 }
+Duktape.fin(SkeletonAnimation.prototype, function (x) {
+	if (x === SkeletonAnimation.prototype) {
+		return;
+	}
+	Polycode.SkeletonAnimation__delete(x.__ptr)
+})
 
 SkeletonAnimation.prototype.addBoneTrack = function(boneTrack) {
 	Polycode.SkeletonAnimation_addBoneTrack(this.__ptr, boneTrack)

+ 6 - 0
bindings/javascript/Polycode/Sound.js

@@ -1,5 +1,11 @@
 function Sound() {
 }
+Duktape.fin(Sound.prototype, function (x) {
+	if (x === Sound.prototype) {
+		return;
+	}
+	Polycode.Sound__delete(x.__ptr)
+})
 
 Sound.prototype.getSampleAsNumber = function(offset,channel) {
 	return Polycode.Sound_getSampleAsNumber(this.__ptr, offset,channel)

+ 6 - 0
bindings/javascript/Polycode/SoundManager.js

@@ -1,5 +1,11 @@
 function SoundManager() {
 }
+Duktape.fin(SoundManager.prototype, function (x) {
+	if (x === SoundManager.prototype) {
+		return;
+	}
+	Polycode.SoundManager__delete(x.__ptr)
+})
 
 SoundManager.prototype.setListenerPosition = function(position) {
 	Polycode.SoundManager_setListenerPosition(this.__ptr, position)

+ 6 - 0
bindings/javascript/Polycode/Sprite.js

@@ -1,5 +1,11 @@
 function Sprite() {
 }
+Duktape.fin(Sprite.prototype, function (x) {
+	if (x === Sprite.prototype) {
+		return;
+	}
+	Polycode.Sprite__delete(x.__ptr)
+})
 
 Sprite.prototype.getName = function() {
 	return Polycode.Sprite_getName(this.__ptr)

+ 6 - 0
bindings/javascript/Polycode/SpriteFrame.js

@@ -33,3 +33,9 @@ SpriteFrame.prototype.__set_frameID = function(val) {
 	Polycode.SpriteFrame__set_frameID(this.__ptr, val)
 }
 
+Duktape.fin(SpriteFrame.prototype, function (x) {
+	if (x === SpriteFrame.prototype) {
+		return;
+	}
+	Polycode.SpriteFrame__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/SpriteSet.js

@@ -1,5 +1,11 @@
 function SpriteSet() {
 }
+Duktape.fin(SpriteSet.prototype, function (x) {
+	if (x === SpriteSet.prototype) {
+		return;
+	}
+	Polycode.SpriteSet__delete(x.__ptr)
+})
 
 SpriteSet.prototype.setTexture = function(texture) {
 	Polycode.SpriteSet_setTexture(this.__ptr, texture)

+ 6 - 0
bindings/javascript/Polycode/SpriteState.js

@@ -1,5 +1,11 @@
 function SpriteState() {
 }
+Duktape.fin(SpriteState.prototype, function (x) {
+	if (x === SpriteState.prototype) {
+		return;
+	}
+	Polycode.SpriteState__delete(x.__ptr)
+})
 
 SpriteState.prototype.setName = function(name) {
 	Polycode.SpriteState_setName(this.__ptr, name)

+ 6 - 0
bindings/javascript/Polycode/String.js

@@ -24,6 +24,12 @@ String.prototype.__set_w_contents = function(val) {
 	Polycode.String__set_w_contents(this.__ptr, val.__ptr)
 }
 
+Duktape.fin(String.prototype, function (x) {
+	if (x === String.prototype) {
+		return;
+	}
+	Polycode.String__delete(x.__ptr)
+})
 
 String.prototype.size = function() {
 	var retVal = new size_t()

+ 6 - 0
bindings/javascript/Polycode/TextureResourceLoader.js

@@ -1,5 +1,11 @@
 function TextureResourceLoader() {
 }
+Duktape.fin(TextureResourceLoader.prototype, function (x) {
+	if (x === TextureResourceLoader.prototype) {
+		return;
+	}
+	Polycode.TextureResourceLoader__delete(x.__ptr)
+})
 
 TextureResourceLoader.prototype.loadResource = function(path,targetPool) {
 	var retVal = new Resource()

+ 6 - 0
bindings/javascript/Polycode/TimeInfo.js

@@ -74,3 +74,9 @@ TimeInfo.prototype.__set_yearDay = function(val) {
 	Polycode.TimeInfo__set_yearDay(this.__ptr, val)
 }
 
+Duktape.fin(TimeInfo.prototype, function (x) {
+	if (x === TimeInfo.prototype) {
+		return;
+	}
+	Polycode.TimeInfo__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/Timer.js

@@ -1,5 +1,11 @@
 function Timer() {
 }
+Duktape.fin(Timer.prototype, function (x) {
+	if (x === Timer.prototype) {
+		return;
+	}
+	Polycode.Timer__delete(x.__ptr)
+})
 
 Timer.prototype.Pause = function(paused) {
 	Polycode.Timer_Pause(this.__ptr, paused)

+ 6 - 0
bindings/javascript/Polycode/TouchInfo.js

@@ -31,3 +31,9 @@ TouchInfo.prototype.__set_type = function(val) {
 	Polycode.TouchInfo__set_type(this.__ptr, val)
 }
 
+Duktape.fin(TouchInfo.prototype, function (x) {
+	if (x === TouchInfo.prototype) {
+		return;
+	}
+	Polycode.TouchInfo__delete(x.__ptr)
+})

+ 6 - 0
bindings/javascript/Polycode/Vector2.js

@@ -20,6 +20,12 @@ Vector2.prototype.__set_y = function(val) {
 	Polycode.Vector2__set_y(this.__ptr, val)
 }
 
+Duktape.fin(Vector2.prototype, function (x) {
+	if (x === Vector2.prototype) {
+		return;
+	}
+	Polycode.Vector2__delete(x.__ptr)
+})
 
 Vector2.prototype.set = function(x,y) {
 	Polycode.Vector2_set(this.__ptr, x,y)

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio