QOpcUaNode *QOpcUaClient::node(const QString &nodeId) delete or not?
-
Hello there,
I have a question regarding thenodemethod 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
nodemethod is called?I would appreciate all help.
-
Hello there,
I have a question regarding thenodemethod 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
nodemethod 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.