- GUSTAVO MARCELINO
- PowerBuilder
- Saturday, 11 April 2020 10:38 PM UTC
I need to do Multithread to run a process in the background and then return to the user. But I realized that every time I call Thread the system is not freeing it from memory. I created an EMPTY UserObject to test, and then used the following code to test on a 0.1 second timer:
///////////////
string ls_nm_thread
ls_nm_thread = "thread_" + is_cd_mercado + "_orders_" + String(Now(), 'dd-mm-yyyy_hh:mm:ss.fff')
SharedObjectRegister("n_shared", ls_nm_thread)
SharedObjectGet(ls_nm_thread, ln_shared)
SharedObjectUnRegister(ls_nm_thread)
//////////////
This code is not calling any function to execute, I just realized that the problem is when registering the thread that the memory keeps going up. I've tried using GarbageCollect () below but it doesn't work either.
Any idea?
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.