[thelist] RE: (answer) Randomizing Question

jeff jeff at members.evolt.org
Thu Nov 30 07:21:37 CST 2000


: From: Raymond K. Camden
: p.s. Jeff, I'd love to see where you read that using
: functions in strings could lead to memory leaks.  Do
: you have a URL?

i think you misunderstood what i was saying.  i didn't say that using
functions within strings would cause memory leaks.  more specifically i said
that the use of hashes unnecessarily could do that.  while the <cfset> tag
isn't one of them that's prone to it, the issue of readability still

what i did find i found after one of those late night/early morning "crap,
what could possibly be causing the server to fall apart at 1am every night?"
escapades.  where this information lies now is unknown.  i'll dig though and
see if i can't find it again.

i do recall from memory that some of the issues had to do with using a
<cfset> where you were setting a variable and it's value using the
SetVariable() function but not assigning it to a temp variable, ala:

<cfset SetVariable(foo, form.bar)>

instead of the proper way:

<cfset temp = SetVariable(foo, form.bar)>

another issue was the beyond necessary use of hashes within
<cfif>/<cfelseif> tags, ala:

<cfif #FindNoCase("$", "#form.bid_amount#")#>

instead of the proper way:

<cfif FindNoCase("$", form.bid_amount)>

again, this is all from memory.  even if i'm unable to produce a url
detailing the issues like this that cause memory leaks there's enough of an
argument to not break these rules as they lend themselves to sloppy code and
reduced readability.



mailto:jeff at members.evolt.org

More information about the thelist mailing list