You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by yz...@apache.org on 2017/07/20 12:31:21 UTC

[16/27] ignite git commit: IGNITE-5753: CPP Memory leak fixed.

IGNITE-5753: CPP Memory leak fixed.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/07cc05f5
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/07cc05f5
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/07cc05f5

Branch: refs/heads/ignite-5658
Commit: 07cc05f51666b19598abf0e8dcb2d2e534369df3
Parents: 038a90a
Author: Igor Sapego <is...@gridgain.com>
Authored: Fri Jul 14 18:23:46 2017 +0300
Committer: Igor Sapego <is...@gridgain.com>
Committed: Fri Jul 14 18:23:46 2017 +0300

----------------------------------------------------------------------
 .../platforms/cpp/core/include/ignite/cache/query/query_sql.h    | 4 ++++
 .../cpp/core/include/ignite/cache/query/query_sql_fields.h       | 4 ++++
 2 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/07cc05f5/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h b/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h
index eb0606a..365dcaa 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/query/query_sql.h
@@ -249,6 +249,10 @@ namespace ignite
                  */
                 void ClearArguments()
                 {
+                    std::vector<impl::cache::query::QueryArgumentBase*>::iterator iter;
+                    for (iter = args.begin(); iter != args.end(); ++iter)
+                        delete *iter;
+
                     args.clear();
                 }
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/07cc05f5/modules/platforms/cpp/core/include/ignite/cache/query/query_sql_fields.h
----------------------------------------------------------------------
diff --git a/modules/platforms/cpp/core/include/ignite/cache/query/query_sql_fields.h b/modules/platforms/cpp/core/include/ignite/cache/query/query_sql_fields.h
index bf8d7ac..e00da28 100644
--- a/modules/platforms/cpp/core/include/ignite/cache/query/query_sql_fields.h
+++ b/modules/platforms/cpp/core/include/ignite/cache/query/query_sql_fields.h
@@ -278,6 +278,10 @@ namespace ignite
                  */
                 void ClearArguments()
                 {
+                    std::vector<impl::cache::query::QueryArgumentBase*>::iterator iter;
+                    for (iter = args.begin(); iter != args.end(); ++iter)
+                        delete *iter;
+
                     args.clear();
                 }