remove many unnecessary destructors

This commit is contained in:
Cameron Ross 2018-04-20 20:45:23 -03:00
parent b16a3338b5
commit 993dd6c5bc
No known key found for this signature in database
GPG key ID: 777897D98DC91C54
7 changed files with 0 additions and 58 deletions

View file

@ -101,17 +101,6 @@ final class Constructor
addConstructorScalar("tag:yaml.org,2002:merge", &constructMerge);
}
/// Destroy the constructor.
@nogc pure @safe nothrow ~this()
{
fromScalar_.destroy();
fromScalar_ = null;
fromSequence_.destroy();
fromSequence_ = null;
fromMapping_.destroy();
fromMapping_ = null;
}
/** Add a constructor function from scalar.
*
* The function must take a reference to $(D Node) to construct from.

View file

@ -126,13 +126,6 @@ struct Loader
}
}
/// Destroy the Loader.
@trusted ~this()
{
reader_.destroy();
scanner_.destroy();
parser_.destroy();
}
/// Set stream _name. Used in debugging messages.
void name(string name) pure @safe nothrow @nogc

View file

@ -142,16 +142,6 @@ final class Parser
marks_.reserve(32);
}
///Destroy the parser.
@trusted ~this()
{
currentEvent_.destroy();
tagDirectives_.destroy();
tagDirectives_ = null;
states_.destroy();
marks_.destroy();
}
/**
* Check if the next event is one of specified types.
*

View file

@ -81,13 +81,6 @@ final class Representer
addRepresenter!SysTime(&representSysTime);
}
///Destroy the Representer.
~this() pure @safe nothrow
{
representers_.destroy();
representers_ = null;
}
///Set default _style for scalars. If style is $(D ScalarStyle.Invalid), the _style is chosen automatically.
@property void defaultScalarStyle(ScalarStyle style) pure @safe nothrow
{

View file

@ -69,13 +69,6 @@ final class Resolver
if(defaultImplicitResolvers){addImplicitResolvers();}
}
///Destroy the Resolver.
~this() pure @safe nothrow
{
yamlImplicitResolvers_.destroy();
yamlImplicitResolvers_ = null;
}
/**
* Add an implicit scalar resolver.
*

View file

@ -170,16 +170,6 @@ final class Scanner
fetchStreamStart();
}
/// Destroy the scanner.
~this() @trusted
{
tokens_.destroy();
indents_.destroy();
possibleSimpleKeys_.destroy();
possibleSimpleKeys_ = null;
reader_ = null;
}
/// Check if the next token is one of specified types.
///
/// If no types are specified, checks if any tokens are left.

View file

@ -85,12 +85,6 @@ struct Serializer
~this() @safe
{
emitter_.emit(streamEndEvent(Mark(), Mark()));
YAMLVersion_.destroy();
YAMLVersion_ = null;
serializedNodes_.destroy();
serializedNodes_ = null;
anchors_.destroy();
anchors_ = null;
}
///Serialize a node, emitting it in the process.