I wasn't able to locate a known issue for ProcessBook with the information you provided.
Can you narrow down what variable is overflowing / where within your code the exception occurs or is this random too?
What exactly is "rebuild/refresh" referring too?
Is my understanding correct that you initialize controls with each "rebuild/refresh"? Why?
Hi Gregor thank you for your quick reply,
What I named "rebuild/refresh" is indeed initialization of controls. I rebuild controls when the user change the curent context, like change the date or change the AF element.
I narrow down my issue and it's seems didn't come from the code I quote before.
I think have identified my issue.
I'm using a pdi file and a piw file. The piw file has several displays and reference to the pdi file. The pdi file has global variables and global vba codes.
These variables and vba codes are commun of all displays on the piw. I was using public variables directly from piw to my displays (on piw). And I suppose that my issue of overflow memory come from this use.
I will modify the access level of my variables from public to private. And I will build get() and set() functions to access to my variables.
I will let you know if it resolves my issue.
The event for changing current context is a little flaky. It fires just BEFORE the context changes. What we do in our addins is set a global flag when we get a context changed event and then subscribe to Application.OnIdle. Once that fires, if the global flag is set, we clear it and do the context change processing because at that point it has completed.