http://d.puremagic.com/issues/show_bug.cgi?id=11060
Summary: delete gives InvalidMemoryOperationError
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from [email protected] 2013-09-17 22:13:43 PDT ---
class B{
int*a;
this(){
a=new int;
}
~this(){
version(A1)
delete a;//core.exception.InvalidMemoryOperationError ; even though
http://dlang.org/deprecate.html#delete doesn't list as deprecated yet
version(A2)
a.clear;//works even though docs recommends DEPRECATED 'Scheduled for
deprecation in December 2012. Please use destroy instead of clear.'; and should
appear in http://dlang.org/deprecate.html#delete
version(A3)
a.destroy;//OK
}
}
void main(){
auto a=new B;
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------