mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
Revert "Type: Add TypeManager->TypeList() and use for ListVal()"
This reverts commit 24c606b4df
.
This commit introduced a memory leak ListVal::Append() modifying
the cached TYPE_ANY type list.
This commit is contained in:
parent
10f96aeba3
commit
a0540f96a1
4 changed files with 4 additions and 36 deletions
16
src/Type.h
16
src/Type.h
|
@ -2,7 +2,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <optional>
|
||||
|
@ -867,21 +866,6 @@ protected:
|
|||
TypePtr yield_type;
|
||||
};
|
||||
|
||||
// Holds pre-allocated Type objects.
|
||||
class TypeManager
|
||||
{
|
||||
public:
|
||||
TypeManager();
|
||||
|
||||
// Get a Typelist instance with the given type tag.
|
||||
const TypeListPtr& TypeList(TypeTag t) const;
|
||||
|
||||
private:
|
||||
std::array<TypeListPtr, NUM_TYPES> base_list_types;
|
||||
};
|
||||
|
||||
extern TypeManager* type_mgr;
|
||||
|
||||
// True if the two types are equivalent. If is_init is true then the test is
|
||||
// done in the context of an initialization. If match_record_field_names is
|
||||
// true then for record types the field names have to match, too.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue