I have declared a dojo class and confused a bit.
define(["dojo/_base/declare",
"config/commonConfig",
"esri/SpatialReference",
"esri/geometry/Extent",
"esri/geometry/Point"],
function (declare,config, SpatialReference, Extent, Point) {
var wgs1984 = new SpatialReference({ "wkt": config.wktWgs1984 });
return declare("modules.utils", null, {
wgs1984: wgs1984,
});
});
I created varibles named wgs1984 out of the class and referenced in class. Is there a difference the following three stuations:
var wgs1984 = new SpatialReference({ "wkt": config.wktWgs1984 });
return declare("modules.utils", null, {
wgs1984: wgs1984,
});
Is this call gives same instance on memory each time?
and
return declare("modules.utils", null, {
wgs1984: new SpatialReference({ "wkt": config.wktWgs1984 })
});
Is this call create new instance on memory?
and
return declare("modules.utils", null, {
wgs1984: SpatialReference({ "wkt": config.wktWgs1984 })
});
Is this call create new instance on memory?