2
votes

In my project I use Ant as a build script. During compile phase I have to compile about 20 modules and the number is growing. To compile my modules I sequentially call mxmlc task. Everything works as expected except that it seems that mxmlc doesn't release memory.

I already set:

export ANT_OPTS="-Xms1536m -Xmx1536m -XX:PermSize=1024m -XX:MaxPermSize=2048m"

But my build script already reaches the limit. So, I am curious if there is any way to release unused memory? Or maybe there is another handly way to avoid memory leaks?

As an idea I consider to create additional build script that takes some args and does build only of one module and call this flex build script from my main build script as a external app. But it is a hack. Would be great to know some more professional way to handle it...

Thank you all in advance!

2

2 Answers

2
votes

I had this problem and solved it by having the ANT task for mxmlc fork:

<mxmlc fork="true" ... >

This causes mxmlc to spawn another process for the compiling (of each application/module).

0
votes

As a temporal solution I have implemented my "idea" described above. Works actually fine. Hope it will be usefull for somebody.