[Issue 11357] Weird behavior of appender with File as the element... do not know exactly where the bug resides.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 25 14:16:43 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=11357


monarchdodra at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |monarchdodra at gmail.com


--- Comment #3 from monarchdodra at gmail.com 2013-10-25 14:16:41 PDT ---
Issue is in appender, that doesn't properlly construct objects when inserting
them, it merely assign them.

There is an existing pull that already fixes this:
https://github.com/D-Programming-Language/phobos/pull/1529

That said, putting things with destructors (such as File) is a *terrible* idea,
as things put inside dynamic arrays are never "finalized" (destroyed). So
basically, you'll never close your files.

Prefer using std.container.Array: Not only does this correctly construct your
objects, it will also deterministically manage their lifecycle.

TY for filing the issue.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list