# Running out of Memory

**URL:** <https://discourse.processing.org/t/running-out-of-memory/11701>\
**Category:** Coding Questions\
**Created:** [May 30, 2019, 6:16am UTC](https://discourse.processing.org/t/running-out-of-memory/11701 "2019-05-30T06:16:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrPyro](https://avatars.discourse-cdn.com/v4/letter/m/96bed5/32.png) [@MrPyro](https://discourse.processing.org/u/MrPyro)\
**Post date:** [May 30, 2019, 6:16am UTC](https://discourse.processing.org/t/running-out-of-memory/11701/1 "2019-05-30T06:16:26Z")

</div>

Hi,

For quite some time now, I have been trying to figure out a solution to my problem. I am running out of memory, storing PShape objects. Currently, I am adding around 250,000 child shapes to a main PShape object that gets draw each frame. I have noticed that adding a child to a PShape object saves that instance of the shape, so is there a way to get it to just copy the geometry of the shape instead? Or is there a way to draw the shapes to a PGraphics instead and simply copying the camera and drawing it to the PApplet?

-Thanks
