Skip to main content

[Migrated content. Thread originally posted on 08 April 2005]

Hello everyone, I noticed that if I load an ActiveX into a program (declaring it into a screen section or displaying it at run-time) than even if I make the destroy of the handler of it than the .ocx file appears "in use" 'till I don't exit from the runtime (so only the "stop run" instruction unloads it: the handler destroy's and even if the cancel of the program that displays it are un-effective.
Has someone's an idea if it's a runtime bug or an expected behaviour?
Thanks in Advance, Giovanni

[Migrated content. Thread originally posted on 08 April 2005]

Hello everyone, I noticed that if I load an ActiveX into a program (declaring it into a screen section or displaying it at run-time) than even if I make the destroy of the handler of it than the .ocx file appears "in use" 'till I don't exit from the runtime (so only the "stop run" instruction unloads it: the handler destroy's and even if the cancel of the program that displays it are un-effective.
Has someone's an idea if it's a runtime bug or an expected behaviour?
Thanks in Advance, Giovanni
This is expected behavior, and it is in fact a side effect of Microsoft Windows performance scheme.
The OS program loader keeps the object in memory in case it will be referred again to optimize performance.
Why, is this causing you problems?

[Migrated content. Thread originally posted on 08 April 2005]

Hello everyone, I noticed that if I load an ActiveX into a program (declaring it into a screen section or displaying it at run-time) than even if I make the destroy of the handler of it than the .ocx file appears "in use" 'till I don't exit from the runtime (so only the "stop run" instruction unloads it: the handler destroy's and even if the cancel of the program that displays it are un-effective.
Has someone's an idea if it's a runtime bug or an expected behaviour?
Thanks in Advance, Giovanni
Just an observation... We use ActiveX controls quite extensively and in many programs. If AcuCorp were to "unload" the control after each destroy, the performance would probably not be good when another program uses that same control.

In my opinion, this is done on purpose during the runtime session so that programs that use the control can access it more quickly. I'm sure someone else can verify what I'm saying is accurate, but I see this as a benefit.

Rob

[Migrated content. Thread originally posted on 08 April 2005]

Hello everyone, I noticed that if I load an ActiveX into a program (declaring it into a screen section or displaying it at run-time) than even if I make the destroy of the handler of it than the .ocx file appears "in use" 'till I don't exit from the runtime (so only the "stop run" instruction unloads it: the handler destroy's and even if the cancel of the program that displays it are un-effective.
Has someone's an idea if it's a runtime bug or an expected behaviour?
Thanks in Advance, Giovanni
Just an observation... We use ActiveX controls quite extensively and in many programs. If AcuCorp were to "unload" the control after each destroy, the performance would probably not be good when another program uses that same control.

In my opinion, this is done on purpose during the runtime session so that programs that use the control can access it more quickly. I'm sure someone else can verify what I'm saying is accurate, but I see this as a benefit.

Rob

[Migrated content. Thread originally posted on 08 April 2005]

Hello everyone, I noticed that if I load an ActiveX into a program (declaring it into a screen section or displaying it at run-time) than even if I make the destroy of the handler of it than the .ocx file appears "in use" 'till I don't exit from the runtime (so only the "stop run" instruction unloads it: the handler destroy's and even if the cancel of the program that displays it are un-effective.
Has someone's an idea if it's a runtime bug or an expected behaviour?
Thanks in Advance, Giovanni
hello everyone,
1) my first objective was to understand the scope of this particoular behaviour and You both get the goal.
2) My fear was to drain or keep in use resources for a component that maybe rarely used.
3) I understand that runtime behaviour maybe oriented to a better performance due to an heavy and extended use of a particoular control, but If I've got a control with particoular purposes that is loaded for only one or two programs and it's usage is rare, than I'd prefer to have full control of where loading and unloading the control, maybe not iwth handle's destroy but maybe with a kind on "cancel" just like I can do with .cob modules.
What you think about it?
TIA Giovanni

[Migrated content. Thread originally posted on 08 April 2005]

Hello everyone, I noticed that if I load an ActiveX into a program (declaring it into a screen section or displaying it at run-time) than even if I make the destroy of the handler of it than the .ocx file appears "in use" 'till I don't exit from the runtime (so only the "stop run" instruction unloads it: the handler destroy's and even if the cancel of the program that displays it are un-effective.
Has someone's an idea if it's a runtime bug or an expected behaviour?
Thanks in Advance, Giovanni
Just to make one thing clear. The runtime does not on purpose keep activex in memory.
The OS does this to optimize, and if it runs low on resources, the OS will do the required cleanup that can be done to reallocate resources.

[Migrated content. Thread originally posted on 08 April 2005]

Hello everyone, I noticed that if I load an ActiveX into a program (declaring it into a screen section or displaying it at run-time) than even if I make the destroy of the handler of it than the .ocx file appears "in use" 'till I don't exit from the runtime (so only the "stop run" instruction unloads it: the handler destroy's and even if the cancel of the program that displays it are un-effective.
Has someone's an idea if it's a runtime bug or an expected behaviour?
Thanks in Advance, Giovanni
Hi Gisle, thankU for explanation, now I'm more relaxed on using ActiveX.
have a nice day, Giovanni

[Migrated content. Thread originally posted on 08 April 2005]

Hello everyone, I noticed that if I load an ActiveX into a program (declaring it into a screen section or displaying it at run-time) than even if I make the destroy of the handler of it than the .ocx file appears "in use" 'till I don't exit from the runtime (so only the "stop run" instruction unloads it: the handler destroy's and even if the cancel of the program that displays it are un-effective.
Has someone's an idea if it's a runtime bug or an expected behaviour?
Thanks in Advance, Giovanni
Hi Gisle, thankU for explanation, now I'm more relaxed on using ActiveX.
have a nice day, Giovanni