[Issue 11060] New: delete gives InvalidMemoryOperationError
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Sep 17 22:13:44 PDT 2013
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: nobody at puremagic.com
ReportedBy: thelastmammoth at gmail.com
--- Comment #0 from thelastmammoth at gmail.com 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: -------
More information about the Digitalmars-d-bugs
mailing list