浏览代码

Add zombie API

Hugh Sanderson 14 年之前
父节点
当前提交
c9267b6518
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      std/cpp/vm/Gc.hx

+ 10 - 0
std/cpp/vm/Gc.hx

@@ -19,6 +19,16 @@ class Gc
 
    #if gc_extra
    // Can't add these until the next hxcpp release....
+   static public function doNotKill(inObject:Dynamic) : Void
+   {
+      untyped __global__.__hxcpp_gc_do_not_kill(inObject);
+   }
+
+   static public function getNextZombie() : Dynamic
+   {
+      return untyped __global__.__hxcpp_get_next_zombie();
+   }
+
    static public function safePoint() : Void
    {
       untyped __global__.__hxcpp_gc_safe_point();