Implement reference counting (#592)

This commit is contained in:
Daniel Wirtz
2019-06-05 23:15:39 +02:00
committed by GitHub
parent 3ed76a97f0
commit 0484a6b740
601 changed files with 261645 additions and 146131 deletions

View File

@ -0,0 +1,26 @@
{
// Normal assignment will retain and release.
let a = /* __retain( */ "" /* ) */;
// __release(a)
}
function getRef(): string {
return /* __retain( */ "" /* ) */;
}
{
// Assignment of a return value picks up its skipped autorelease
let b = getRef();
// __release(b);
}
class Ref {}
{
// Assignment of an instantiation picks up its skipped autorelease
let c = new Ref();
// __release(c);
}