I am learning Haxe for Flash recently and have experience with ActionScript 3.
I noticed that there is an operation in AS3 delete, is there something like that deletein Haxe? Is it deleteabout GC? Are there any tips for Haxe newbies on memory management?
delete
Marcus has already explained what the operator is doing delete. For use with Haxe, please refer to this page .
So the equivalent of Haxe for delete foo.b untyped __delete__(foo, "b"). In case you are going to use it a lot, I suggest you include this in a function;)
delete foo.b
untyped __delete__(foo, "b")
Haxe, delete AS3 . AS3. delete . :
var foo:Object { a: "Hello, ", b: "world!", toString: function () { return a + b; } } foo.toString() // Hello, world!
, . -. :
delete foo.b; foo.toString(); // Hello, undefined
, foo b, undefined. b . - , , , . , delete , , .
foo
b
undefined
Source: https://habr.com/ru/post/1765415/More articles:Parsing a text file using Linq - linqGoogle Maps API Map Not Displaying - javascriptrun jQuery by variable, not by document - variablesCan I use the Game Center logo in my application? - iphoneHttpClient: how to get a base socket from an existing connection? - javaAndroid Twitter4j Error - androidShow similar results mySQL - phpanother 100% CSS height issue - htmlВыбор записей через таблицу соединений в Ruby on Rails - ruby-on-railsQuestion about memory allocation / reallocation - cAll Articles