Skip to content

Memory associated only with non-primitive plots is not garbage collected after empty!(axis) #4302

@adrianboyko

Description

@adrianboyko
  • what version of Makie are you running? Makie 0.21.9 and GLMakie 0.10.9
  • can you reproduce the bug with a fresh environment ? (]activate --temp; add Makie) Yes
  • What platform + GPU are you on? Kubuntu 24.04, Wayland, i5-4570, Mesa Intel HD Graphics 4600

The following program consumes all available memory, presumably because the large matrices are not being garbage collected. Note that contour! is used and that if it is changed to heatmap! then garbage collection works as expected and all is fine.

using GLMakie
fig::Figure = Figure()
ax::Makie.Axis = Axis(fig[1,1])
display(fig)
while true
    empty!(ax)
    big_matrix::Matrix{Float64} = zeros(10_000, 10_000)
    big_matrix[1,1] = 1
    contour!(ax, big_matrix)
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions