On Thursday, 19 December 2013 at 08:17:36 UTC, Jeremy DeHaan
wrote:
On Thursday, 19 December 2013 at 07:27:14 UTC, Kagamin wrote:
https://github.com/Jebbs/DSFML/blob/master/src/dsfml/graphics/text.d#L241
Destructors are called by GC during the collection cycle, and
writeln may want to allocate, which is not allowed during
collection, it may be safer to use printf.
Ah, interesting. Was not aware of that. I do have this issue in
the tracker though: https://github.com/Jebbs/DSFML/issues/62
Basically, I was going to remove those anyways in favor of the
internal error output system, which is just a static File
instance(in case people are logging errors and such and want to
see when objects are destroyed). Would that have the same
issues? If not, it looks like I might as well get that done
sooner rather than later.
Wow, brain fart.
Let me ask this instead. Under what circumstances would a File
want to allocate? The output that an object was destroyed was
really only put in there because I thought it could be useful. It
can be removed if this turns out to be an unsafe action. I
haven't had any problems with it that I can think of so far
though.