CompHash: use class IntrusivePtr for the type field

This commit is contained in:
Max Kellermann 2020-02-18 12:13:33 +01:00
parent 31b3a56740
commit 53f49e0057
7 changed files with 17 additions and 22 deletions

View file

@ -20,11 +20,10 @@ static void analyzer_del_func(void* v)
AnalyzerSet::AnalyzerSet(File* arg_file) : file(arg_file)
{
TypeList* t = new TypeList();
auto t = make_intrusive<TypeList>();
t->Append(file_mgr->GetTagEnumType()->Ref());
t->Append(BifType::Record::Files::AnalyzerArgs->Ref());
analyzer_hash = new CompositeHash(t);
Unref(t);
analyzer_hash = new CompositeHash(std::move(t));
analyzer_map.SetDeleteFunc(analyzer_del_func);
}