     public init(vm: HSQUIRRELVM) {
         self.vm = vm
         stack = Stack(vm: vm)
-        (stack as! Stack).parent = self
+        vm ~ self
     }
     
     convenience public init(stackSize: Int) {

        
        // MARK: - SquirrelVM::Stack::private
        private let vm: HSQUIRRELVM
        private weak var parent: SquirrelVM?
    }
}

        self.init(stackSize: SquirrelVM.DefaultStackSize)
    }
    
    public static func associated(#vm: HSQUIRRELVM) -> SquirrelVM {
        if let vm = ~vm {
            return vm
        }
        
        return SquirrelVM(vm: vm)
    }
    
    deinit {
        vm ~ nil
        sq_close(vm)
    }
    
