-
Notifications
You must be signed in to change notification settings - Fork 266
Memory Leak in graph.union #534
Copy link
Copy link
Closed
Labels
todoTriaged for implementation in some unspecified future versionTriaged for implementation in some unspecified future version
Milestone
Description
There seems to be a memory leak in graph.union. When running the sample code below, I get the following memory profile:

import random
import numpy as np
from igraph import Graph
if __name__ == '__main__':
for i in range(200):
num_nodes = 100
num_edges = 100000
graph = Graph(num_nodes)
edges = [
random.choices(range(num_nodes), k=2)
for _ in range(num_edges)
]
# Create a new graph with the same edges
attributes = {"test": np.arange(len(edges))}
new_graph = Graph(edges=edges, edge_attrs={"test": np.arange(len(edges))})
# Generate a union of the 2 graphs
union_graph = graph.union(new_graph)
I'm not sure if this issue is related to the python side of igraph, or if it's in the c code.
Note: this was tested with python-igraph==0.9.10
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
todoTriaged for implementation in some unspecified future versionTriaged for implementation in some unspecified future version