What are the most common things in PowerScript that consume memory without releasing it?
I'm trying to troubleshoot a window that is consuming memory at a level we were not expecting, and I'm honestly running out of ideas of what to even look for. I've read over various posts here and elsewhere over the years that you should either call Reset() or ResetUpdate() on a DataWindow for example (I've seen both, not sure if both will give the same ultimate result) and potentially even clearing the dataobject property itself, but they do not seem to be the culprit and I'm not sure where else to even begin.
And I do know the operating system doesn't immediately reclaim the released memory, in this case we've got a list datawindow that you click on a row which retrieves children, and we consistently have the process claim another 2-10mb of memory each time, eventually hitting the memory limit and then we crash.
Roland is correct ... Using the GarbageCollect commands or waiting for the PBVM to perform Garbage Collection on PB only marks blocks of memory as "free" to re reused.
However, a neat little trick I used to use is to momentarily minimize the PB App (say on an IDLE event) by using the SEND command. If you send a Minimize to the MDI Frame window, do a a few yields and the then send he MDI Frame a "restore" command ... I have found that the PBVM would actually release memory that is marked as "free".
Note: I have not tested the above in 2017Rx.
HTH
Regards ... Chris