On Wednesday, 27 January 2016 at 22:39:54 UTC, Igor wrote:
But doesn't this ultimately defeat the purpose of having manual
memory management if one has to add it to the GC to be scanned?
You can make the LOC related to the GC optional with an
additional bool template parameter and a static if,
On Wednesday, 27 January 2016 at 22:39:54 UTC, Igor wrote:
Ultimately I want no GC dependency. Is there an article that
shows how this can be done?
You can link with gcstub
https://github.com/D-Programming-Language/druntime/blob/master/src/gcstub/gc.d it will replace GC completely.
On Wednesday, 27 January 2016 at 06:40:00 UTC, Basile B. wrote:
On Tuesday, 26 January 2016 at 01:09:50 UTC, Igor wrote:
Is there any examples that shows how to properly allocate an
object of a class type with the new allocators and then
release it when desired?
This is more or less the same
On Tuesday, 26 January 2016 at 01:09:50 UTC, Igor wrote:
Is there any examples that shows how to properly allocate an
object of a class type with the new allocators and then release
it when desired?
This is more or less the same answer as you've get previously
except that I don't use emplace
On Tuesday, 26 January 2016 at 13:56:39 UTC, Igor wrote:
//ubyte[__traits(classInstanceSize, App)] buffer;
auto buffer =
core.stdc.stdlib.malloc(__traits(classInstanceSize,
App))[0..__traits(classInstanceSize, App)];
works, so it is the ubyte line.
Make sure the buffer out
On Tuesday, 26 January 2016 at 13:56:39 UTC, Igor wrote:
//ubyte[__traits(classInstanceSize, App)] buffer;
auto buffer =
core.stdc.stdlib.malloc(__traits(classInstanceSize,
App))[0..__traits(classInstanceSize, App)];
works, so it is the ubyte line.
Can you please post the f
V Tue, 26 Jan 2016 13:56:39 +
Igor via Digitalmars-d-learn
napsáno:
> On Tuesday, 26 January 2016 at 09:32:06 UTC, Daniel Kozak wrote:
> > V Tue, 26 Jan 2016 05:47:42 +
> > Igor via Digitalmars-d-learn
> > napsáno:
> >
> >> On Tuesday, 26 January 2016 at 05:11:54 UTC, Mike Parker wrote
On Tuesday, 26 January 2016 at 09:32:06 UTC, Daniel Kozak wrote:
V Tue, 26 Jan 2016 05:47:42 +
Igor via Digitalmars-d-learn
napsáno:
On Tuesday, 26 January 2016 at 05:11:54 UTC, Mike Parker wrote:
> [...]
Can you try it with GC.disable()?
//ubyte[__traits(classInstanceSize, App)] buffe
On Tuesday, 26 January 2016 at 09:32:06 UTC, Daniel Kozak wrote:
V Tue, 26 Jan 2016 05:47:42 +
Igor via Digitalmars-d-learn
napsáno:
[...]
Can you try it with GC.disable()?
Didn't change anything.
On Tuesday, 26 January 2016 at 01:09:50 UTC, Igor wrote:
Is there any examples that shows how to properly allocate an
object of a class type with the new allocators and then release
it when desired?
There are a number of different patterns discussed and
illustrated with examples at
http://wi
On Tuesday, 26 January 2016 at 01:09:50 UTC, Igor wrote:
Is there any examples that shows how to properly allocate an
object of a class type with the new allocators and then release
it when desired?
There's an example of class object allocation in the
std.experimental.allocator docs:
// Dyn
V Tue, 26 Jan 2016 05:47:42 +
Igor via Digitalmars-d-learn
napsáno:
> On Tuesday, 26 January 2016 at 05:11:54 UTC, Mike Parker wrote:
> > On Tuesday, 26 January 2016 at 01:09:50 UTC, Igor wrote:
> >> Is there any examples that shows how to properly allocate an
> >> object of a class type w
On 01/25/2016 09:47 PM, Igor wrote:
> it fails because the string representing the name inside App is null...
> Which doesn't happen when I use new.
There must be something else going on. Do you see it with a simpler type?
> Should it work as expected(which it isn't)
new allocates and construc
On Tuesday, 26 January 2016 at 05:11:54 UTC, Mike Parker wrote:
On Tuesday, 26 January 2016 at 01:09:50 UTC, Igor wrote:
Is there any examples that shows how to properly allocate an
object of a class type with the new allocators and then
release it when desired?
Allocate a block of memory big
On Tuesday, 26 January 2016 at 01:09:50 UTC, Igor wrote:
Is there any examples that shows how to properly allocate an
object of a class type with the new allocators and then release
it when desired?
Allocate a block of memory big enough to hold an instance of your
class using whichever alloca
Is there any examples that shows how to properly allocate an
object of a class type with the new allocators and then release
it when desired?
16 matches
Mail list logo