This guide is almost finished. You have now performed all the tasks necessary to create a graph with its schema, add data and query this data afterwards. There is only one inevitable and very important final step: the proper closing of the database.
You must take into account the fact that all the collections and iterators should be closed first. You can close them now, or an even better programming practice is to close them as soon as they are no longer needed.
To close DEX, once collections and iterators have been closed, you must first close the
Session (or sessions) which will free all the temporary information stored in it, then close the
Database to proceed to the closure of the
sess.close(); db.close(); dex.close();
sess.Close(); db.Close(); dex.Close();
delete sess; delete db; delete dex;