On Monday, 16 October 2017 at 13:49:50 UTC, Atila Neves wrote:
On Monday, 16 October 2017 at 09:58:46 UTC, Ecstatic Coder
wrote:
On Sunday, 15 October 2017 at 20:42:36 UTC, Laeeth Isharc
wrote:
On Sunday, 15 October 2017 at 07:21:55 UTC, Ecstatic Coder
wrote:
[...]
Out of curiosity, what is it that stops you keeping the heap
small and allocating memory manually for the rest?
In D I've the added complexity in trying to use the game
engine (cocos2dx, unreal, cryengine) C++ libraries from D.
So that's not worth the effort, if I can't use D's powerful
standard library as usual.
I don't like the idea that any hidden object allocation or
string concatenation can trigger a GC for an undefined amount
of time.
In C++ you also have plenty of objects
constructors/destructors called everywhere in your back, but
none of them will ever trigger a GC...
A std::shared_ptr going out of scope can pause the program for
just as long as a GC mark-and-sweep.
Have you tried using a @nogc main loop in your programs/games?
I'm curious to learn why that might not have worked for you.
Atila
Very honestly, shortly after your remark I've tried to use D in
connection with cocos2d-x for a small mobile sports game, and
after two days I've given up.
I've never managed to find an easy way to make D play well with
cocos2d-x. Don't ask me about having it run on android.
But I'm not disgusted.
I still remain VERY interested in being able to developing all my
desktop/mobile gaming developements in D.
It's just that it seems that I'm not smart enough to make this
D/cocos2d-x/android magic happen by myself.
And as I said, I'd prefer to be able to regularly ask D to
progressively collect its bits of memory in some limited and
predefined amount of time (xxx ms) when and where I've decided
to, in the Nim way.
For that also I'm clearly not smart enough to do the job by
myself, and Dmitry has already explained me twice why he's
against that...
So at the moment I'm just waiting that some D/GC/Android genius
manages to make the impossible possible...