# Zoom is leaking memory

**URL:** <https://devforum.zoom.us/t/zoom-is-leaking-memory/38452>\
**Category:** Android\
**Created:** [December 15, 2020, 4:07pm UTC](https://devforum.zoom.us/t/zoom-is-leaking-memory/38452 "2020-12-15T16:07:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alphadevgroup](https://avatars.discourse-cdn.com/v4/letter/a/a87d85/32.png) [@alphadevgroup](https://devforum.zoom.us/u/alphadevgroup)\
**Post date:** [December 15, 2020, 4:07pm UTC](https://devforum.zoom.us/t/zoom-is-leaking-memory/38452/1 "2020-12-15T16:07:41Z")

</div>

**Describe the bug**  
After the fragment is destroyed the application does not properly destroy the instances causing a leak (can cause an `OutOfMemoryError`).

**Which version?**  
v5.2.42043.1112

**To Reproduce**  
Steps to reproduce the behavior:

1. Copy and paste ZoomVideocall.java inside your application
2. Inside a fragment through any ui interface (like a button) start the class using the following functions:

```auto
	private ZoomVideocall mVideocall;

    private void startVideocall() {
        if(mVideocall == null) {
            mVideocall = new ZoomVideocall(requireContext());
        }

        mVideocall.start();
    }

```

1. Add `onDestroyView()`

```auto
	@Override
    public void onDestroyView() {
        super.onDestroyView();
        mVideocall.destroy();
        ...
    }

```

1. Now check with LeakCanary the leak produced.

**Expected behavior**  
Should not leak.

**Files**  
[dump.txt](https://github.com/Ciardini/error04/blob/main/dump.txt)  
[ZoomVideocall.java](https://github.com/Ciardini/error04/blob/main/ZoomVideocall.java)

**Smartphone (please complete the following information):**

- Device: OnePlus Nord

**Additional context**

- Build.VERSION.SDK\_INT: 29
- LeakCanary version: 2.5

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [December 15, 2020, 6:20pm UTC](https://devforum.zoom.us/t/zoom-is-leaking-memory/38452/2 "2020-12-15T18:20:13Z")

</div>

Hi @alphadevgroup, thanks for using our SDK.

Thank you for catching this memory leak. I was able to reproduce this quite easily, and confirmed that it does not require copying over your `ZoomVideocall` class. We will investigate this and let you know as soon as we have an update.

Thanks!
