[Issue 15721] std.experimental.allocator dispose on interface
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Feb 25 21:43:04 PST 2016
https://issues.dlang.org/show_bug.cgi?id=15721
b2.temp at gmx.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |b2.temp at gmx.com
--- Comment #1 from b2.temp at gmx.com ---
GCAllocator is supported but Mallocator produces a free error:
import std.experimental.allocator.mallocator;
import std.experimental.allocator.gc_allocator;
import std.experimental.allocator;
interface Foo {}
class Bar: Foo {}
void main()
{
GCAllocator.instance.dispose(cast(Foo) GCAllocator.instance.make!Bar);
// comment the following line: OK
Mallocator.instance.dispose(cast(Foo) Mallocator.instance.make!Bar);
}
--
More information about the Digitalmars-d-bugs
mailing list