QOpcUaNode *QOpcUaClient::node(const QString &nodeId) delete or not?
Solved
General and Desktop
-
Hello there,
I have a question regarding thenode
method fromQOpcUaClient Class
( https://doc.qt.io/QtOPCUA/qopcuaclient.html#node ).It returns a pointer to a node object. What I was wondering is either after I am done with working with this returned node, should I free the memory under this pointer? Is new memory allocated each time the
node
method is called?I would appreciate all help.
-
"QOpcUaNode *QOpcUaClient::node(const QString &nodeId)
Returns a QOpcUaNode object associated with the OPC UA node identified by nodeId. The caller becomes owner of the node object."
From https://doc-snapshots.qt.io/qtopcua/qopcuaclient.html#node
So, you have to free the memory.