On Friday, 1 November 2013 at 08:59:36 UTC, Namespace wrote:
On Friday, 1 November 2013 at 05:49:04 UTC, Stretto wrote:
On Thursday, 31 October 2013 at 22:03:18 UTC, Namespace wrote:
The 'it' property is only some 'singleton' approach.
You can write:
void foo() {
auto buffer = Mallocator.all
On Friday, 1 November 2013 at 05:49:04 UTC, Stretto wrote:
On Thursday, 31 October 2013 at 22:03:18 UTC, Namespace wrote:
The 'it' property is only some 'singleton' approach.
You can write:
void foo() {
auto buffer = Mallocator.allocate(42);
/// ... many code
}
And at the end of the scop
On Thursday, 31 October 2013 at 22:03:18 UTC, Namespace wrote:
The 'it' property is only some 'singleton' approach.
You can write:
void foo() {
auto buffer = Mallocator.allocate(42);
/// ... many code
}
And at the end of the scope buffer is cleared because
Mallocator's destructor call
The 'it' property is only some 'singleton' approach.
You can write:
void foo() {
auto buffer = Mallocator.allocate(42);
/// ... many code
}
And at the end of the scope buffer is cleared because
Mallocator's destructor call deallocateAll (if I'm not wrong).
Hi, I'm new to D and stumbled on the new allocators thread. In
the help there is code like
auto buffer = Mallocator.it.allocate(1024 * 1024 * 4);
scope(exit) Mallocator.it.deallocate(buffer);
which seems redundant and error prone.
Would it not be possible for allocate to automatically