Here's an simplified example
function aColor=function(){
this.toString='rgb(180,180,0)';
}
then later:
context.strokeStyle=new aColor().toString();
will that leak memory, or will the anonymous aColor object be garbage c
ollected?
Given that the code I'm really talking about lets you instantiate a
colorObject() by passing in a color name,
rgb, rgba, or short or long #xxx, and then get whatever else you want
out of it (or you can get multiples
between 0 and 1 of the color value clipped to 0-255 for shading), is
this the right approach? Should it
be an object? The real object is at the top of
dbp-consulting.com/scripts/utilities.js and some use of it is
in dbp-consulting.com/scripts/canvasutilities.js
Patrick
--
To view archived discussions from the original JSMentors Mailman list:
http://www.mail-archive.com/[email protected]/
To search via a non-Google archive, visit here:
http://www.mail-archive.com/[email protected]/
To unsubscribe from this group, send email to
[email protected]