[Issue 5115] std.typecons.scoped problems
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Dec 20 21:02:30 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5115
yebblies <yebblies at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yebblies at gmail.com
--- Comment #2 from yebblies <yebblies at gmail.com> 2010-12-20 21:00:29 PST ---
(In reply to comment #1)
> An interesting example found by Andrej Mitrovic (modified):
>
>
> import std.c.stdio: puts;
> import std.typecons: scoped;
> class Foo {
> ~this() {
> puts("Foo.dtor");
> }
> }
> void main() {
> Foo f1 = scoped!Foo(); // doesn't call dtor after the scope
> auto f2 = scoped!Foo(); // calls dtor after the scope
> }
This example (and the first half of this bug report) appears to be a duplicate
of bug http://d.puremagic.com/issues/show_bug.cgi?id=3516
--
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