Okay, I have another quick CFC/method question:

 

If I pass an structure to a CFC method it is passed by reference. So If I
change it within the CFC, it gets updated and does not need to be returned
per say.  But does it make any difference if the CFC returns the structure
that was supplied as an argument after modifying it? I realize its not
necessary, my question is if this has any additional overhead? 

 

Should I pass the struct into the method, modify and return it like this:

 

<cfinvoke component="#application.core.mycfc#"

method="doSomething"

theData="#myStruct#"

returnVariable="myStruct">

 

Or Should I just call  the method with no returnVariable specified, and set
the returnType to VOID and modify the structure

Inside the CFC method and not bother returning it?

<cfinvoke component="#application.core.mycfc#"

method="doSomething"

theData="#myStruct#">

 

Is there any difference in performance or memory usage that anyone is aware
of? 

 

Brook D.

 

 

 

 




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342863
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to