The answer is no, the memory allocated by the sub-VI will not be released, it will remain in use until the next time the sub-VI is called...then it might reduce or increase it's size depending on how it works. You can improve the performance by ensuring that the VI always works on the same memory (do not build arrays but initialize a shift register only at the first run and then use the replace array elements function instead e.g.). Building arrays in a loop is a no no.
If the VI is only to run now and then you can force the memory to be released either by loading the VI dynamically and then closing all references to it when you are finished with it for that run...or you can use the Request Deallocation function that you can find on the advanced -> data manipulati
on menu in LV7. If the VI runs all the time your better off leaving it in memory.