# clean ram memory after deleting source filter

**URL:** https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318
**Category:** ParaView Support
**Created:** [November 19, 2025, 10:52am UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318 "2025-11-19T10:52:28Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [November 19, 2025, 10:52am UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/1 "2025-11-19T10:52:28Z")

</div>

Hello,

I am creating and deleting several filters and I thought I notice ‘memory leakage’ in paraview when creating a filter, and then deleting it. but now I am for sure experiencing it, my ram is enought to open one time a image filter that I am opening using the ImageReader() function, which creates the filter on the pipeline, this consumed a bunch of ram and worked correctly, but then i selected the created object on the pipeline and delete it, then in the python consol, i import gc and collect it, and the ram is still ‘consumed’ and if I run again the reading of the image, paraview closes for lack of memory.

is there any way in python to clean this memory after not being used anymore? i would like to open the file sequentially, one by one in same paraview instance, as i am limited in ram.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 19, 2025, 10:53am UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/2 "2025-11-19T10:53:31Z")

</div>

> [@otaolafr](#):
>
> the ImageReader() function,

I’m not sure of what this is, please share steps to reproduce.

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [November 19, 2025, 11:00am UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/3 "2025-11-19T11:00:08Z")

</div>

I am opening the raw data that I shared with you yesteday (as the TIFF importer looks like it has a bug, i succesfully imported the data without the intermediate format (TIFF), and directly imported the raw data using the image reader). so I have a .vol file which is the raw data, i open it in paraview (by open file → show all files → select the .vol file) then select ImageReader to import it, and it works as expected, reading the data correctly.

This takes a big ram comnsomption 32 gb, which i have enought, I would like to import it, cut a slice export the slice and the continue with another similar file of same weight, the thing is that when I delete the fist filter, the memory is not clean I still have in total 47 gb consumed (shown by htop, and the ram bar on paraview). therefore if i open a second file, paraview will crash, as i dont have 47 +32 gb.

i tried with gb.collect() but nothing changed, I would like to keep the rest of the session pipeline without modification therefore I am not reseting the session.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 19, 2025, 3:19pm UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/4 "2025-11-19T15:19:08Z")

</div>

If there is a leak it may be specific to the RAW data reader, please share data and statefile.

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [November 20, 2025, 6:30am UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/5 "2025-11-20T06:30:35Z")

</div>

shared in a private message

@mathieu, isnt it related to this issue? [https://gitlab.kitware.com/paraview/paraview/-/issues/22858](https://gitlab.kitware.com/paraview/paraview/-/issues/22858)

it is more or less my case, i want to loop over several files, import them do some treatment, recover a small section to export and then import the next one.  
thanks in advance.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 20, 2025, 9:12am UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/6 "2025-11-20T09:12:10Z")

</div>

> [@otaolafr](#):
>
> isnt it related to this issue?

Are you using python ?

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [November 20, 2025, 9:24am UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/7 "2025-11-20T09:24:32Z")

</div>

In the two cases, if I open the raw data using the GUI with the image reader or if i do it in python using the function mentionned here [crashing when using clip over Image (Uniform Rectilinear Grid)](https://discourse.paraview.org/t/crashing-when-using-clip-over-image-uniform-rectilinear-grid/17320)

in the case of the GUI, i select the filter and simply delete it

in the case of python, i tested the two options, select the filter and simply delete it, and use Delete(filter)  
in non of the cases the ram is being free, and therefore when I run the python function again OR import using the GUI on exactly same file (so memory should be enough, and when importing first time i had around 5 gb extra free) paraview simply crashes for lack of memory.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 21, 2025, 9:30am UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/8 "2025-11-21T09:30:29Z")

</div>

> [@otaolafr](#):
>
> in the case of the GUI, i select the filter and simply delete it

Does ram get freed in that scenario ?

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [November 21, 2025, 9:31am UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/9 "2025-11-21T09:31:58Z")

</div>

No in neither situations it gets free at all.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 21, 2025, 1:25pm UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/10 "2025-11-21T13:25:54Z")

</div>

Please share a state file, as I dont know how you configured the ImageReader.

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [November 21, 2025, 1:42pm UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/11 "2025-11-21T13:42:31Z")

</div>

sale as here [crashing when using clip over Image (Uniform Rectilinear Grid) - #9 by otaolafr](https://discourse.paraview.org/t/crashing-when-using-clip-over-image-uniform-rectilinear-grid/17320/9)

the function reads the .info file to set up the ImageReader() function

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 21, 2025, 2:33pm UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/12 "2025-11-21T14:33:30Z")

</div>

Opening and closing the file repeatably show only a marginal increase of memory usage here. While the ram may not appeared freed as soon as the source is deleted, it is usable by the application when reallocating. There is no leak as far as I can tell.

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [November 21, 2025, 2:34pm UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/13 "2025-11-21T14:34:40Z")

</div>

when I open the file, delete it, then open it again with same settings, paraview will crash for me. i am using the release 6.0.1

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 21, 2025, 2:35pm UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/14 "2025-11-21T14:35:59Z")

</div>

How much ram do you have left after opening it the first time ?

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [November 21, 2025, 2:36pm UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/15 "2025-11-21T14:36:40Z")

</div>

less than necessary to open a second time. around 15gb

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 21, 2025, 2:37pm UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/16 "2025-11-21T14:37:41Z")

</div>

I’ll need to run this test on a machine able to actually open the file, because I had to simulate it on my machine with only 32Gb, this will take me some time im afraid.

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [November 21, 2025, 2:39pm UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/17 "2025-11-21T14:39:06Z")

</div>

if a teamviewer of something in that realm could help with my pc do not hesitate.

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [November 21, 2025, 3:26pm UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/18 "2025-11-21T15:26:11Z")

</div>

> [@mwestphal](#):
>
> I’ll need to run this test on a machine able to actually open the file, because I had to simulate it on my machine with only 32Gb, this will take me some time im afraid.

Maybe a way to test is to open an image that the machine is capable 1 time but not 2. like if you have 16 gb open something in 8 gb realm, and then re opening it?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [November 21, 2025, 3:28pm UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/19 "2025-11-21T15:28:59Z")

</div>

I do see a spike in usage when I reopen, maybe something is only freed when the reader reeexecute. Investigation needed.

---

<div class="post-metadata">

### Author: ![otaolafr](https://discourse.paraview.org/user_avatar/discourse.paraview.org/otaolafr/32/3595_2.png) [@otaolafr](https://discourse.paraview.org/u/otaolafr)
#### Post date: [November 21, 2025, 3:38pm UTC](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318/20 "2025-11-21T15:38:38Z")

</div>

I dont know I suspect that is something in the realm of paraview re using the ‘pre located clean/not clean memory’ if it requires a partial part or something like this, as for the second passage i dont have enought memory and would require use a lot of the ‘pre located clean/not clean memory’.

[Next page](https://discourse.paraview.org/t/clean-ram-memory-after-deleting-source-filter/17318.md?page=2)
