# Possible Error in vtkCocoaGLView.mm

**URL:** https://discourse.vtk.org/t/possible-error-in-vtkcocoaglview-mm/11547
**Category:** Development
**Tags:** code
**Created:** [May 26, 2023, 12:52pm UTC](https://discourse.vtk.org/t/possible-error-in-vtkcocoaglview-mm/11547 "2023-05-26T12:52:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![aschrempf](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/a/e19adc/32.png) [@aschrempf](https://discourse.vtk.org/u/aschrempf)
#### Post date: [May 26, 2023, 12:52pm UTC](https://discourse.vtk.org/t/possible-error-in-vtkcocoaglview-mm/11547/1 "2023-05-26T12:52:03Z")

</div>

Hi there!

Thanks for developing VTK!

Actually im using vtk 9.2.6 on a new M2 (Mac mini 2023) on macOS Ventura (SDK 13.1, Ventura 13.4) and within my app an error occurs when destructing an QVTKOpenGLNativeWidget with QT 6.4.3. In the debugger it turns out that the problem is located in **vtkCocoaGLView.mm** in method **dealloc()**. Changing the method to

```auto
#if !VTK_OBJC_IS_ARC
- (void)dealloc
{
  [_rolloverTrackingArea release];
  [super dealloc];
}
#endif

```

just solved the problem for me. So it seems that **release** should run before **dealloc**.

Thanks!

---

<div class="post-metadata">

### Author: ![Paulo\_Carvalho](https://discourse.vtk.org/user_avatar/discourse.vtk.org/paulo_carvalho/32/370_2.png) [@Paulo\_Carvalho](https://discourse.vtk.org/u/Paulo_Carvalho)
#### Post date: [May 27, 2023, 12:56pm UTC](https://discourse.vtk.org/t/possible-error-in-vtkcocoaglview-mm/11547/2 "2023-05-27T12:56:24Z")

</div>

Hello,

If you found a bug, you can report it here: [https://gitlab.kitware.com/vtk/vtk/-/issues](https://gitlab.kitware.com/vtk/vtk/-/issues)

regards,

PC
