mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 08:08:19 +00:00
Var: pass IntrusivePtr to add_global(), add_local() etc.
Those functions don't have a well-defined reference passing API, and we had lots of memory leaks here. By using IntrusivePtr, reference ownership is well-defined.
This commit is contained in:
parent
17a2f1a3ab
commit
2c0ece7376
5 changed files with 85 additions and 101 deletions
|
@ -134,7 +134,7 @@ ComponentManager<T, C>::ComponentManager(const string& arg_module, const string&
|
|||
tag_enum_type(make_intrusive<EnumType>(module + "::" + local_id))
|
||||
{
|
||||
::ID* id = install_ID(local_id.c_str(), module.c_str(), true, true);
|
||||
add_type(id, tag_enum_type.get(), 0);
|
||||
add_type(id, tag_enum_type, 0);
|
||||
zeekygen_mgr->Identifier(id);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue