Main Site Documentation

Unload assembly on Panda II


#1

Hi!

Is it possible to unload assembly loaded with


Assembly asm = Assembly.Load(raw);

to release memory after using it?

I tried AppDomain but it is not implemented in Panda II.

Regards

Jack


#2

The short answer is no, not without AppDomain.

Even with AppDomain you need a 2 step process. First you create an object from the default domain loaded into a new domain; you cannot stop this object from existing in both and ever being destroyed. Next use that newly created object in the new domain to load other assemblies in the new domain which [italic]can[/italic] be destroyed.

See http://pyxis2.codeplex.com for examples.


#3

Hi,

thanks for answer.

So what can I do to overcome problem of running out of memory (RAM, and slowly ROM)?

I planned to save modules on SD card and load them when needed (usually once a day).

Jack


#4

I’m not sure I have a good answer for that other than upgrading to a board that supports AppDomains.

I tackled the same problem on the Arduino a couple years ago by writing my own virtual CPU and compiler but that’s probably more work than you’re going to want to do.

Anyone else tackle app loading on the smaller boards?


#5

Is it possible to add this funcionality to Panda 2?

The thing is that I am using it for home automation and Panda 2 has appropriate number of I/O.

The only thing I am missing is low RAM and coming low ROM.