On Saturday, 31 August 2019 at 12:07:56 UTC, cc wrote:
And what, if anything, can I do to avoid it?
import core.stdc.stdio : printf;
There are no @nogc versions of the Phobos write* and format
functions.
And what, if anything, can I do to avoid it?
string[] arr = ["abcd", "efgh", "ijkl"];
char[4096] buf;
char[] res;
writeln(GC.stats);
res = sformat(buf, "%s", arr);
assert(res.ptr == buf.ptr);
writeln(res);
writeln(GC.stats);
On Wednesday, 28 August 2019 at 10:33:33 UTC, GreatSam4sure wrote:
On Wednesday, 28 August 2019 at 09:35:55 UTC, Jacob Carlborg
wrote:
On 2019-08-28 10:14, GreatSam4sure wrote:
[...]
DWT is ported manually from Java. Here's a very short guide
[1]. That guide is probably written for D1.
On Wednesday, 28 August 2019 at 08:14:25 UTC, GreatSam4sure wrote:
Good day everyone.
DWT is a library for creating cross-platform GUI applications.
It's a port of the SWT Java library from Eclipse. Currently
supported platforms are Windows, using Win32 and Linux, using
GTK.
[...]
On Saturday, 31 August 2019 at 21:12:32 UTC, ag0aep6g wrote:
I've made a pull request to get rid of those allocations:
https://github.com/dlang/phobos/pull/7163
Merged.
On 31.08.19 14:07, cc wrote:
I'm guessing it's allocating a string first to write the contents
of the array and then inserting that string into the buffer I supplied.
Is there no way to have it skip this step and just write each element
(plus the joining punctuation, etc) directly into the