Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release() in Plugin.cs never been called #6

Open
lwhuang opened this issue Jul 22, 2015 · 4 comments
Open

Release() in Plugin.cs never been called #6

lwhuang opened this issue Jul 22, 2015 · 4 comments

Comments

@lwhuang
Copy link

lwhuang commented Jul 22, 2015

Release() in Plugin.cs never been called, so when I close AB, it's not really closed, the plugin and AB instance still in task list

@triforcely
Copy link

One of the users noticed that this problem happens when Broker OLE object is accessed (atleast that's what I think this object is).

Anyway, I use a workaround in my plugin where I simply watch AmiBroker process' (Broker.exe) window handle and when it becomes 0x0 I call "System.Environment.Exit(0)" (I assume that if AmiBroker closed it's window, my plugin should be disposed). Far from ideal but works for now.

In the distant future I plan to listen for WM_CLOSE event of AmiBroker window instead of polling process continuously and then I will probably contribute this to the project.

@n1ghthawk
Copy link

One of the users noticed that this problem happens when Broker OLE object is accessed (atleast that's what I think this object is).

Anyway, I use a workaround in my plugin where I simply watch AmiBroker process' (Broker.exe) window handle and when it becomes 0x0 I call "System.Environment.Exit(0)" (I assume that if AmiBroker closed it's window, my plugin should be disposed). Far from ideal but works for now.

In the distant future I plan to listen for WM_CLOSE event of AmiBroker window instead of polling process continuously and then I will probably contribute this to the project.

Hi, have you by any chance implemented a solution to this issue?

@triforcely
Copy link

@n1ghthawk only what I described above, which is monitoring of the window handle and exiting when I detect that it became 0x0. It was good enough solution for me. Unfortunately, I've lost the source code so I can't give you the snippet.

@n1ghthawk
Copy link

@n1ghthawk only what I described above, which is monitoring of the window handle and exiting when I detect that it became 0x0. It was good enough solution for me. Unfortunately, I've lost the source code so I can't give you the snippet.

@triforcely thanks for replying. If I figure out a way I will post it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants