Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Merge pending PRs #16

Merged
merged 3 commits into from
Jul 27, 2016
Merged

Merge pending PRs #16

merged 3 commits into from
Jul 27, 2016

Conversation

gbrayut
Copy link
Contributor

@gbrayut gbrayut commented Jul 27, 2016

Merge pending PRs... except keep COINIT_MULTITHREADED due to memory leak when using COINIT_APARTMENTTHREADED

See Unity-Technologies#8

SokoloffA and others added 3 commits June 16, 2016 19:59
WbemScripting is apartment threaded according to its registry entries
so switch multi-threaded OLE to apartment threaded enabling the global
lock to be removed.

Correct missing CoUninitialize call when CoInitializeEx returns S_FALSE
as documented here:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms695279(v=vs.85).aspx

Also:
* Cleanup OleError checking in Query.
* Handle nil return from CreateObject by returning ErrNilCreateObject
  before it causes a panic. This has been seen in rare cases in production
  when built under go v1.6.
This reverts part of commit 04850ec.

using COINIT_APARTMENTTHREADED caused a memory leak.
See Unity-Technologies#8
gbrayut added a commit to bosun-monitor/bosun that referenced this pull request Jul 27, 2016
@gbrayut gbrayut merged commit d4ae5b4 into master Jul 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants