10000 Release V0.3.0 beta 2: Add LWDR.free(..) · hmmdyl/LWDR · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jan 7, 2023. It is now read-only.

V0.3.0 beta 2: Add LWDR.free(..)

Compare
Choose a tag to compare
@hmmdyl hmmdyl released this 17 Jun 07:22
· 56 commits to master since this release

D's delete is deprecated. LWDR.free(..) has been added as a replacement. When possible, LWDR.free will invoke the target's destructor.

Example:

class C {}
C c = new C();
LWDR.free(c); // if C has a destructor, it will be invoked
struct S {}
S* s = new S();
LWDR.free(s); // if S has a destructor, it will be invoked
int[] array = new int[](2);
LWDR.free(array); 
struct S {}
S[] s = new S[](2);
LWDR.free(s); // For each S element, its destructor will be called (if it has one)
0