This commit is contained in:
@@ -11,6 +11,12 @@ public:
|
||||
AngelScriptItemUseScript(asIScriptObject* scriptObject, const AngelScriptResolver* resolver)
|
||||
: _scriptObject(scriptObject), _resolver(resolver) {}
|
||||
|
||||
~AngelScriptItemUseScript(){
|
||||
if (_scriptObject != nullptr){
|
||||
_scriptObject->Release();
|
||||
}
|
||||
}
|
||||
|
||||
[[nodiscard]] bool IsItemUsable() const override;
|
||||
[[nodiscard]] bool IsCreatureUseItem() const override;
|
||||
bool IsUseValidForCreature(CreatureLib::Battling::Creature* creature) const override;
|
||||
|
||||
@@ -34,6 +34,9 @@ private:
|
||||
|
||||
public:
|
||||
~AngelScriptResolver() override {
|
||||
for (const auto& ius : _itemUseScripts) {
|
||||
delete ius.second;
|
||||
}
|
||||
delete _contextPool;
|
||||
for (const auto& category : _typeDatabase) {
|
||||
for (const auto& type : category.second) {
|
||||
|
||||
Reference in New Issue
Block a user