PDA

View Full Version : [DEFER] Ext.lib.Ajax.request, why use Ext.applyIf(me, options) ? it make some leaks.



cyrilluce
26 May 2010, 2:11 AM
In Ext.lib.Ajax.request, it copy some properties from options to itself, and some never used but always keep.

For example, the store.load will call with reader in options, if that's no 'reader' on Ext.lib.Ajax (applyIf)
It will keep it, and cause some leak (reader ref store, store's listeners maybe ref components, etc)

Is there any other reason use Ext.applyIf(me, options) ?

Condor
26 May 2010, 6:11 AM
It's needed to be able to specify some header related request options.

But it should be replaced with Ext.copyTo to avoid memory leaks like you described above.

ps. I'm moving this to bugs.

Jamie Avins
26 May 2010, 10:04 AM
The class is being refactored in the next major Rev.