# large matrices

**URL:** https://forum.highend3d.com/t/large-matrices/6861
**Category:** Maya
**Tags:** mel
**Created:** [September 25, 2001, 1:38pm UTC](https://forum.highend3d.com/t/large-matrices/6861 "2001-09-25T13:38:58Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rob-bateman](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/r/4491bb/32.png) [@rob-bateman](https://forum.highend3d.com/u/rob-bateman)
#### Post date: [September 25, 2001, 1:38pm UTC](https://forum.highend3d.com/t/large-matrices/6861/1 "2001-09-25T13:38:58Z")

</div>

In a mel script I'm doing, I require a huge global matrix - sommit like :

global matrix $Some\_Matrix[100][100];

My question is - The matrix obviously takes up a large amount of memory, is there any way to delete it after the script has finished processing? or is it going to float around until Maya quits?

I know you can use clear with arrays, but is there any similar proc for matrices?

Alternatively - is there any way to dynamically allocate memory for a matrix?

---

<div class="post-metadata">

### Author: ![jeffd](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/71c47a/32.png) [@jeffd](https://forum.highend3d.com/u/jeffd)
#### Post date: [September 25, 2001, 2:13pm UTC](https://forum.highend3d.com/t/large-matrices/6861/2 "2001-09-25T14:13:53Z")

</div>

Is it possible to have the matrix be local to a procedure instead of global? If so, it will clean itself up when the procedure is done running.

--JeffD

---

<div class="post-metadata">

### Author: ![rob-bateman](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/r/4491bb/32.png) [@rob-bateman](https://forum.highend3d.com/u/rob-bateman)
#### Post date: [September 26, 2001, 9:40am UTC](https://forum.highend3d.com/t/large-matrices/6861/3 "2001-09-26T09:40:22Z")

</div>

It has to exist for the duration of the script, but the script runs an app, around which the core data is this matrix. I can't see any way of making it local, but at the same time getting rid of it would be nice.
