Returning a global accumulator

10 views
Skip to first unread message

Anders Lauri

unread,
Apr 2, 2020, 11:33:13 AM4/2/20
to gsql-users
Hi,

Accordingly to the query best practice documentation one should (for global accumulator collections) run .clear(); to ensure memory is available for re-use. If one returns a global accumulator, what will happen? Is this a potentially a memory leak or will the memory be free by another mechanism? If the former how should one reason here to avoid this? E.g. define a local stack variable and copy the content of the accumulator to this one to return?

Thanks,
Anders Lauri

Xinyu Chang

unread,
Apr 2, 2020, 6:27:12 PM4/2/20
to Anders Lauri, gsql-users
After the query execution, the memory of the runtime data structures will be automatically released. 

When it returns it does copy. 

Thanks.


Xinyu Chang
Director of Customer Solutions
TigerGraph, Inc.


--
Welcome to GSQL-user group.
- our mission is bringing the power of graph databases to everyone www.opengsql.org
- technical resource can be found here https://docs.tigergraph.com/
---
You received this message because you are subscribed to the Google Groups "gsql-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gsql-users+...@opengsql.org.
To view this discussion on the web visit https://groups.google.com/a/opengsql.org/d/msgid/gsql-users/37e635b8-8820-4998-b320-3cef723bb357%40opengsql.org.
Reply all
Reply to author
Forward
0 new messages