Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/rt/lifetime.d
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,19 @@ private

private immutable bool callStructDtorsDuringGC;

deprecated ("The callStructDtorsDuringGC feature will be removed in the next release cycle.")
private pragma(inline, true) void setCallStructDtorsDuringGC(bool flag)
{
cast() callStructDtorsDuringGC = flag;
}

extern (C) void lifetime_init()
{
// this is run before static ctors, so it is safe to modify immutables
import rt.config;
string s = rt_configOption("callStructDtorsDuringGC");
if (s != null)
cast() callStructDtorsDuringGC = s[0] == '1' || s[0] == 'y' || s[0] == 'Y';
setCallStructDtorsDuringGC = s[0] == '1' || s[0] == 'y' || s[0] == 'Y';
else
cast() callStructDtorsDuringGC = true;
}
Expand Down