# Memory leak occurs if I use vtkSmartPointer in sub-thread.

**URL:** <https://discourse.vtk.org/t/memory-leak-occurs-if-i-use-vtksmartpointer-in-sub-thread/10631>\
**Category:** Development\
**Created:** [February 7, 2023, 9:19am UTC](https://discourse.vtk.org/t/memory-leak-occurs-if-i-use-vtksmartpointer-in-sub-thread/10631 "2023-02-07T09:19:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sohnishi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sohnishi/32/6507_2.png) [@sohnishi](https://discourse.vtk.org/u/sohnishi)\
**Post date:** [February 8, 2023, 11:00am UTC](https://discourse.vtk.org/t/memory-leak-occurs-if-i-use-vtksmartpointer-in-sub-thread/10631/2 "2023-02-08T11:00:46Z")

</div>

This problem is sollved.  
I recompiled vtk libraries with changing the “VTK\_SMP\_IMPLEMENTION\_TYPE” from OpenMP to sequential.  
The memory leak stopped.

---

_[View the full topic](https://discourse.vtk.org/t/memory-leak-occurs-if-i-use-vtksmartpointer-in-sub-thread/10631)._
