[Mono-list] Two questions about System.Windows.Controls.Image

Spencer, Matthew MSpencer at ndsuk.com
Fri Aug 17 03:36:57 EDT 2007


Hi All
 
I have been playing around with the Moonlight implementation (building a
simple Flickr client) and have a couple of questions about the use of
Image.
 
 Either I am using it incorrectly, or there is a severe memory leak in
its implementation.  The way I am using it is to create two Image
objects, and fade between the two of them, repeatedly loading the next
image by calling SetSource(..) on the hidden object.  It appears that
the memory of previous images is never released.  Is this what is
expected, or is there a problem with the current implementation?
 
My next question is about garbage collection when the bulk of the
storage for an object is in native space (as I think it is with the
Image class).  I know I have done this before with Java and the garbage
collector never kicked in because the runtime was only aware of a small
amount of data being consumed by unreferenced objects (a reference to
the native data store).  I'm not sure if Mono uses a similar policy on
deciding if garbage collection is necessary, but this may cause a
problem for Silverlight apps in the future if it does.
 
Regards
 
Matt
*********************************************************************************************************
This e-mail is confidential, the property of NDS Ltd and intended for the addressee only.  Any dissemination, copying or distribution of this message or any attachments by anyone other than the intended recipient is strictly prohibited.  If you have received this message in error, please immediately notify the postmaster at nds.com and destroy the original message.  Messages sent to and from NDS may be monitored.  NDS cannot guarantee any message delivery method is secure or error-free.  Information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.  We do not accept responsibility for any errors or omissions in this message and/or attachment that arise as a result of transmission.  You should carry out your own virus checks before opening any attachment.  Any views or opinions presented are solely those of the author and do not necessarily represent those of NDS.

To protect the environment please do not print this e-mail unless necessary.

NDS Limited Registered office: One Heathrow Boulevard, 286 Bath Road, West Drayton, Middlesex, UB7 0DQ, United Kingdom. A company registered in England and Wales  Registered no. 3080780   VAT no. GB 603 8808 40-00
**********************************************************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-list/attachments/20070817/aa5a7533/attachment.html 


More information about the Mono-list mailing list