On Monday, 24 July 2017 at 18:01:19 UTC, ketmar wrote:
Clinton wrote:
On Monday, 24 July 2017 at 14:51:04 UTC, rikki cattermole
wrote:
Stuff the GC.
You don't need it to care about collecting (or destroying for
that matter).
Tell it to free[0] the array directly.
```D
T[] array;
GC.free(a
Clinton wrote:
On Monday, 24 July 2017 at 14:51:04 UTC, rikki cattermole wrote:
Stuff the GC.
You don't need it to care about collecting (or destroying for that
matter).
Tell it to free[0] the array directly.
```D
T[] array;
GC.free(array.ptr);
```
Normally I would suggest to create your
On Monday, 24 July 2017 at 14:51:04 UTC, rikki cattermole wrote:
Stuff the GC.
You don't need it to care about collecting (or destroying for
that matter).
Tell it to free[0] the array directly.
```D
T[] array;
GC.free(array.ptr);
```
Normally I would suggest to create your own buffer, but b
On Monday, 24 July 2017 at 14:51:04 UTC, rikki cattermole wrote:
Stuff the GC.
You don't need it to care about collecting (or destroying for
that matter).
Tell it to free[0] the array directly.
```D
T[] array;
GC.free(array.ptr);
```
Normally I would suggest to create your own buffer, but b
rikki cattermole wrote:
Tell it to free[0] the array directly.
```D
T[] array;
GC.free(array.ptr);
or just `delete arr;`. it is marked as "deprecated" in changelog, but who
cares? it works.
Stuff the GC.
You don't need it to care about collecting (or destroying for that matter).
Tell it to free[0] the array directly.
```D
T[] array;
GC.free(array.ptr);
```
Normally I would suggest to create your own buffer, but because of the
DB library probably doesn't support that, no point tr
Hi guys, I have a question on how to free large arrays in D after
they're no longer needed.
Let's say I have this:
SomeKey[] getKeys() {
SomeKey[] n;
foreach(batching stuff...) {
SomeKey newstuff = db.select!(SomeKey[])(...); // gets around
6M of these from db
redis.send("newItem