On Feb 13, 2007, at 23:31 UTC, Jeff Ayling wrote:

> So, every time the fi.ReadAll reads the file a new TextEncoding  
> reference is added to the stack. Using the code from my original  
> post, the Runtime.ObjectRefs for TextEncoding increases by 1 each  
> time the ReadAll is called. Pop it in a Timer with 1 millisecond loop
> and this grows to over 20,000 references within a few seconds.
> 
> Is this ok? Is this a problem that there are sooo many references to 
> textencoding even after the object is no longer needed?

It may not be a problem, but it does sound like a mistake in the RB
framework -- something's locking a TextEncoding object and not
unlocking it.  If this is an internal object that's used for a default
value, then this isn't important, but it'd still be neater if it were
fixed.

A more important test would be what happens if you pass a TextEncoding
object into ReadAll.  If that gets its reference count incremented, but
not decremented, then this would cause a leak, and that's a serious
problem.

Best,
- Joe

--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to