fix(Foundation): use after free warnings #4189

This commit is contained in:
Alex Fabijanic
2023-10-23 23:45:05 +02:00
parent 47ddacd004
commit cd12420495
2 changed files with 9 additions and 1 deletions

View File

@@ -302,6 +302,10 @@ public:
protected:
P activateObject(P pObject)
{
#if defined(POCO_COMPILER_GCC)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuse-after-free"
#endif
try
{
_factory.activateObject(pObject);
@@ -312,6 +316,9 @@ protected:
throw;
}
return pObject;
#if defined(POCO_COMPILER_GCC)
#pragma GCC diagnostic pop
#endif
}
private: