-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Win32 handle leak fix #11842
Win32 handle leak fix #11842
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,6 +229,11 @@ bool GameInfo::LoadFromPath(const std::string &gamePath) { | |
} | ||
|
||
std::shared_ptr<FileLoader> GameInfo::GetFileLoader() { | ||
if (filePath_.empty()) { | ||
// Happens when workqueue tries to figure out priorities in PrioritizedWorkQueue::Pop(), | ||
// because priority() calls GetFileLoader()... gnarly. | ||
return fileLoader; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just remember that for some loaders, e.g. ones that involve memory caching or http access, the cost of tossing this in the bin and getting a new one a couple times is much higher. Ideally we shouldn't recreate just because that's easiest. -[Unknown] There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oops, put this comment in the wrong place somehow - was meant for the lifetime comment. -[Unknown] |
||
} | ||
if (!fileLoader) { | ||
fileLoader.reset(ConstructFileLoader(filePath_)); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arg, oops. Thanks.
-[Unknown]