You shouldn't be running into namespace conflicts if you set the namescope parameter to true during the createFromXaml call. http://msdn2.microsoft.com/en-us/library/bb412361.aspx
Its more efficient to store a reference rather than finding it every time. And even better would be set the reference during the creation of the new object. For example: newItem = plugIn.content.createFromXaml(xamlString, true); [cid:[email protected]] Adam Kinney Client Platform Evangelism | Microsoft Corp. Tel: (425) 707-2174| Blog: http://adamkinney.com<http://adamkinney.com/> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gilbert Corrales Sent: Thursday, January 03, 2008 1:07 PM To: [email protected] Subject: Re: [OzSilverlight] Best Practices in Memory Usage for SL 1.0 Well actually all objects that I create are actually in use, although there are some that are created from a downloaded xaml file and reused about 40+ times in the same stage, as a grid of thumbnails. Therefore given that this are dinamically created they are not added to the main tree of components because of the naming conflicts. Although there are some objects that do are part of the main tree and for which the question is it more efficient to mantain references in memory for this objects, or just do a quick search for the object every time is needed? Hope this is a bit clearer. On Jan 3, 2008 12:24 PM, Michael Washington <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote: Are you saying that you have XAML objects that are not shown yet you still have them loaded? You do this because: "since they are being created out from the same piece of xaml and not hooked to the main named tree," What method are you using to create the objects. I use this method: http://www.adefwebserver.com/DotNetNukeHELP/Misc/Silverlight/SilverlightControl2/Default.htm I can selectively create objects as I need them and dispose of them and not have them hanging around since I "may" need them. Would this help? On 1/3/08, Gilbert Corrales <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote: Hi guys, I am driving the development of fairly complex app in Silverlight 1.0 and we have got to a point where we have a lot of xaml objects referenced in memory for its direct usage, there are some set of objects (lets call it thumbnails) that must be in memory since they are being created out from the same piece of xaml and not hooked to the main named tree, although there are other set of objects that are attached to the named tree and for which a findName search will work. I am wondering if somebody knows what is more efficient in terms of memory usage, doing a findName every time I need to access and object that can be referenced by name or holding a reference on memory after it gets created? We are seeing browser crashes (specifically in Firefox, and more specifically on Mac and XP, not much on Vista) after some set of time that the application has been running. We have got to tune the amount of function calls around the application, and now we are focusing on MEM usage. Looking at the profiler of Firebug, just on the loading process of the app findName is called around 900 times, in top of that we have page thru data and create new "thumbnails" everytime the user requests new data from the server; we are wondering if we could minimize the amount of objects in mem and exchange for searches. Any help will be greatly appreciated. Best Regards, G. aka. Samiq. -- _______________________________ Gilbert A. Corrales-Villalobos +506 840 7941 Mobile +506 238 2195 Home [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]> ------------------------------------------------------------------- OzSilverlight.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com<http://mailenable.com/> - List managed by www.readify.net<http://www.readify.net/> ------------------------------------------------------------------- OzSilverlight.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com<http://mailenable.com> - List managed by www.readify.net<http://www.readify.net> -- _______________________________ Gilbert A. Corrales-Villalobos +506 840 7941 Mobile +506 238 2195 Home [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ------------------------------------------------------------------- OzSilverlight.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by www.readify.net ------------------------------------------------------------------- OzSilverlight.com - to unsubscribe from this list, send a message back to the list with 'unsubscribe' as the subject. Powered by mailenable.com - List managed by www.readify.net
<<inline: image001.gif>>
