public void Dispose() { if (this.sharedSerializer != null) { this.sharedSerializer.Dispose(); this.sharedSerializer = null; } if (this.adfSerializer != null) { this.adfSerializer.Dispose(); this.adfSerializer = null; } }
internal VowpalWabbitMultiExampleSerializer(VowpalWabbit vw, VowpalWabbitSingleExampleSerializer <TExample> sharedSerializer, VowpalWabbitSingleExampleSerializer <TActionDependentFeature> adfSerializer, Func <TExample, IEnumerable <TActionDependentFeature> > adfAccessor) { // sharedSerializer can be null Contract.Requires(vw != null); Contract.Requires(adfSerializer != null); Contract.Requires(adfAccessor != null); this.vw = vw; this.sharedSerializer = sharedSerializer; this.adfSerializer = adfSerializer; this.adfAccessor = adfAccessor; }