mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-14 15:55:07 +00:00
gs-effect: Also override finalizer for the stored ptr
This commit is contained in:
parent
e7b46063aa
commit
01f23e17fe
1 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ gs::effect::effect(std::string code, std::string name)
|
||||||
: std::runtime_error("Unknown error during effect compile.");
|
: std::runtime_error("Unknown error during effect compile.");
|
||||||
}
|
}
|
||||||
|
|
||||||
reset(effect);
|
reset(effect, [](gs_effect_t* ptr) { gs_effect_destroy(ptr); });
|
||||||
}
|
}
|
||||||
|
|
||||||
gs::effect::effect(std::filesystem::path file) : effect(load_file_as_code(file), file.string()) {}
|
gs::effect::effect(std::filesystem::path file) : effect(load_file_as_code(file), file.string()) {}
|
||||||
|
@ -74,7 +74,7 @@ gs::effect::effect(std::filesystem::path file) : effect(load_file_as_code(file),
|
||||||
gs::effect::~effect()
|
gs::effect::~effect()
|
||||||
{
|
{
|
||||||
auto gctx = gs::context();
|
auto gctx = gs::context();
|
||||||
gs_effect_destroy(get());
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t gs::effect::count_techniques()
|
size_t gs::effect::count_techniques()
|
||||||
|
|
Loading…
Reference in a new issue