I have a problem where Ext.Direct.transactions is retaining information about every call, and so the memory is never free'd. In the case of a form the transaction entry contains a reference to that form, so this is even more memory that hangs around.
Steps to reproduce the problem:
Use the console to show the value for Ext.Direct.transactions.length, which should be 0.
Issue an Ext Direct call and wait for the callback to complete so show the result has been processed.
Use the console to show the value for Ext.Direct.transactions.length, which will now be 1.
The result that was expected:
The transaction entry should be removed from Ext.Direct.transactions after the response has been handled.
The result that occurs instead:
Ext.Direct.transactions retains an entry for the transaction.
Not provided as it requires server-side code. I find this happens with any Ext Direct transaction.
Screenshot or Video:
Debugging already done:
The onData() method of RemotingProvider calls Ext.direct.Manager.removeTransaction() on line 298. This in turn calls getTransaction(), which checks for an isTransaction property on the transaction object. Since there isn't one it performs another look-up which fails and returns undefined. If I call Ext.direct.Manager.removeTransaction() using the original value for the transaction object that's passed into removeTransaction() then the item appears to be removed as expected. I can't find the isTransaction property referred to anywhere else in the framework.
In the forum I was asked: "Looking at line 293 of RemotingProvider.js where the line is right before the getTransaction... what is the event?"
My response: "It's an instance of Ext.direct.RemotingEvent, where the action and method properties match the direct function I called. The type property is "rpc" and the status property is true."
This was suggested as a work around in the forum and it works for me.