# Memory leak when using PreProcessRawData

**URL:** <https://devforum.zoom.us/t/memory-leak-when-using-preprocessrawdata/79810>\
**Category:** Video SDK\
**Tags:** faq-ios, android\
**Created:** [December 6, 2022, 7:22am UTC](https://devforum.zoom.us/t/memory-leak-when-using-preprocessrawdata/79810 "2022-12-06T07:22:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tienpx](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tienpx/32/43557_2.png) [@tienpx](https://devforum.zoom.us/u/tienpx)\
**Post date:** [December 6, 2022, 7:22am UTC](https://devforum.zoom.us/t/memory-leak-when-using-preprocessrawdata/79810/1 "2022-12-06T07:22:22Z")

</div>

**Description**  
When I’m using onPreProcessRawData, I am doing an animation effect but there is a memory leak when using it which leads to app crash. I’m using iOS example app.

**Which Web Video SDK version?**  
1.5.3

**Video SDK Code Snippets**

```auto
- (void)onPreProcessRawData:(ZoomVideoSDKPreProcessRawData *)rawData {
    waterImage = [PreProcessHelper imageWithColor:[PreProcessHelper randomColor]];
    wateri420 = [PreProcessHelper imageToi420:waterImage];
    
    [PreProcessHelper addWaterMark:rawData
                        waterImage:waterImage   
                         wateri420:wateri420
                              offX:rawData.size.width/2
                              offY:rawData.size.height/2
                 enableTransparent:YES];
}

```

**Device**

- Device: iPhone 7
- OS: iOS 15.34.1

---

<div class="post-metadata">

**Author:** ![gianni.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gianni.zoom/32/32523_2.png) [@gianni.zoom](https://devforum.zoom.us/u/gianni.zoom)\
**Post date:** [December 7, 2022, 2:37am UTC](https://devforum.zoom.us/t/memory-leak-when-using-preprocessrawdata/79810/2 "2022-12-07T02:37:46Z")

</div>

Hi @tienpx ,

have you tested to see if you experience this when not using the animation effect?
