Relationship between versions of .Net Framework

P

P Chase

I am developing an application using Visual Studio 2005, Windows XP
(or 2003) and C#. I am using facilities of .Net Framework 3.0, but not
of 3.5.

I am falling foul of some memory leaks in the framework, which
Microsoft claim to have fixed in .Net Framework 3.5 SP1.

I confess to not really understanding how the various versions of .Net
Framework that have been installed on my machines are actually used by
the application.

So my question is: if the leaks really are fixed in 3.5 SP1, will
installing that service pack also fix the same leaks in 3.0?

(Of course, only the Beta of 3.5 SP1 is currently available, but I
could be brave and try it).
 
A

Alvin Bruney [ASP.NET MVP]

what memory leak are you seeing? You need to describe it better and give
some more details.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
 
P

P Chase

what memory leak are you seeing? You need to describe it better and give
some more details.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively onwww.lulu.com/owc$19.99
-------------------------------------------------------


I am developing an application using Visual Studio 2005, Windows XP
(or 2003) and C#. I am using facilities of .Net Framework 3.0, but not
of 3.5.
I am falling foul of some memory leaks in the framework, which
Microsoft claim to have fixed in .Net Framework 3.5 SP1.
I confess to not really understanding how the various versions of .Net
Framework that have been installed on my machines are actually used by
the application.
So my question is: if the leaks really are fixed in 3.5 SP1, will
installing that service pack also fix the same leaks in 3.0?
(Of course, only the Beta of 3.5 SP1 is currently available, but I
could be brave and try it).

My question was not intended to be about the specific issue I am
facing, but the general issue of whether patching .Net Framework 3.5
would also affect my code which is a client of .Net Framework 3.0. I
don't understand how the various versions of .Net that have been
installed interact.

However, since you ask, I can also give details of the specific issue
I am trying to resolve.

I have a server application that uses FlowDocument to turn some text
and images into a nice-looking document. The FlowDocument is
constructed from XAML.

If the FlowDocument has no images in it, then when I am finished with
it, all memory is happily released. But if there are Image elements in
the XAML, then lots of memory is leaked, and the files providing the
image contents are held open.

I read that some image-related leaks in .Net Framework itself are
fixed by 3.5 SP1. So I want to know whether these might fix my issues.
I hoped to get an indication of the likelihood of this, before going
to the trouble of installing SP1, particularly if it might be
difficult to uninstall.

http://blogs.msdn.com/jgoldb/archiv...ks-in-wpf-based-applications-blog-update.aspx
 
R

Rory Becker

Hello P,
I am developing an application using Visual Studio 2005, Windows XP
(or 2003) and C#. I am using facilities of .Net Framework 3.0, but not
of 3.5.

I am falling foul of some memory leaks in the framework, which
Microsoft claim to have fixed in .Net Framework 3.5 SP1.

I would also check to see if your issues are not already cleared up by .Net
3.0 SP1

This would have been installed (I think) by an installation of .Net 3.5 (
If you have that present on your machine) however it is available from http://www.microsoft.com/downloads/...5D-B255-4425-9E65-1E88A0BDB72A&displaylang=en

I confess to not really understanding how the various versions of .Net
Framework that have been installed on my machines are actually used by
the application.

Typically an application attempts to "use" the version of the framework that
it was compiled against. If this is not available I believe it will use the
latest available verion. this only applies to 1.0, 1.1 and 2.0 however. 3.0
and 3.5 use the 2.0 verion of the CLR and so may be considered to be additions
to the 2.0 libraries. This is much the same as if you had included third
party libraries in your app
So my question is: if the leaks really are fixed in 3.5 SP1, will
installing that service pack also fix the same leaks in 3.0?

Hard to say. I would have expected such things fixed in say 3.0 SP2 which
may itself be included in 3.5 SP1.

But this is Microsoft, and with the best will in the world, general consensus
(although not unanimous) is that they have issues with their versioning within
..Net. Nothing wrong as such, just a touch difficult to follow sometimes :)
(Of course, only the Beta of 3.5 SP1 is currently available, but I
could be brave and try it).

Do yourself a favour and don't "Try" anything on a machine you are not prepared
to have die on you. I'm not trying to suggest that this will happen, but
I've found it really pays to be careful with anything beta

I'm really not sure how helpful any of this will be to you but hopefully
something will be :)
 
P

P Chase

Hello P,



I would also check to see if your issues are not already cleared up by .Net
3.0 SP1

This would have been installed (I think) by an installation of .Net 3.5 (
If you have that present on your machine) however it is available fromhttp://www.microsoft.com/downloads/details.aspx?familyid=EC2CA85D-B25...


Typically an application attempts to "use" the version of the framework that
it was compiled against. If this is not available I believe it will use the
latest available verion. this only applies to 1.0, 1.1 and 2.0 however. 3.0
and 3.5 use the 2.0 verion of the CLR and so may be considered to be additions
to the 2.0 libraries. This is much the same as if you had included third
party libraries in your app


Hard to say. I would have expected such things fixed in say 3.0 SP2 which
may itself be included in 3.5 SP1.

But this is Microsoft, and with the best will in the world, general consensus
(although not unanimous) is that they have issues with their versioning within
.Net. Nothing wrong as such, just a touch difficult to follow sometimes :)


Do yourself a favour and don't "Try" anything on a machine you are not prepared
to have die on you. I'm not trying to suggest that this will happen, but
I've found it really pays to be careful with anything beta

I'm really not sure how helpful any of this will be to you but hopefully
something will be :)

Thanks for your help.

I already have the latest non-beta Service Packs of everything. So I
think that the beta of 3.5 SP1 is my only hope for an instant fix. But
not sure if I dare try it, particularly as I don't really know whether
the leaks fixed in 3.5 SP1 are the ones I'm experiencing.
 
J

Jon Skeet [C# MVP]

I already have the latest non-beta Service Packs of everything. So I
think that the beta of 3.5 SP1 is my only hope for an instant fix. But
not sure if I dare try it, particularly as I don't really know whether
the leaks fixed in 3.5 SP1 are the ones I'm experiencing.

Can you test it on a clean virtual machine? That's the safest way in my
experience.
 
A

Alvin Bruney [ASP.NET MVP]

I confess to not really understanding how the various versions of .NetThat's not an issue, your application can only run one version of the .NET
framework at execution time. Further, all versions of the framework are side
by side compatible.
Yes, but not for the reasons you think. 3.5 SP1 actually installs all
service packs for 2.0 and 3.0. The 3.5 SP1 memory leak bug fix, if it exists
at all, would most likely be retrofitted in a service pack for earlier
frameworks. Don't install 3.5 SP1 if you haven't tested the previous SPs for
earlier frameworks. As Jon suggested, VPC is the best way to go.

I'll take a peak at the complete of bug fixes in 3.5 SP1 to see if any deal
with imaging memory leaks. If I find, I'll update this post. Otherwise,
assume I didn't find any.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
-------------------------------------------------------


P Chase said:
what memory leak are you seeing? You need to describe it better and give
some more details.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively onwww.lulu.com/owc$19.99
-------------------------------------------------------


I am developing an application using Visual Studio 2005, Windows XP
(or 2003) and C#. I am using facilities of .Net Framework 3.0, but not
of 3.5.
I am falling foul of some memory leaks in the framework, which
Microsoft claim to have fixed in .Net Framework 3.5 SP1.
I confess to not really understanding how the various versions of .Net
Framework that have been installed on my machines are actually used by
the application.
So my question is: if the leaks really are fixed in 3.5 SP1, will
installing that service pack also fix the same leaks in 3.0?
(Of course, only the Beta of 3.5 SP1 is currently available, but I
could be brave and try it).

My question was not intended to be about the specific issue I am
facing, but the general issue of whether patching .Net Framework 3.5
would also affect my code which is a client of .Net Framework 3.0. I
don't understand how the various versions of .Net that have been
installed interact.

However, since you ask, I can also give details of the specific issue
I am trying to resolve.

I have a server application that uses FlowDocument to turn some text
and images into a nice-looking document. The FlowDocument is
constructed from XAML.

If the FlowDocument has no images in it, then when I am finished with
it, all memory is happily released. But if there are Image elements in
the XAML, then lots of memory is leaked, and the files providing the
image contents are held open.

I read that some image-related leaks in .Net Framework itself are
fixed by 3.5 SP1. So I want to know whether these might fix my issues.
I hoped to get an indication of the likelihood of this, before going
to the trouble of installing SP1, particularly if it might be
difficult to uninstall.

http://blogs.msdn.com/jgoldb/archiv...ks-in-wpf-based-applications-blog-update.aspx
 
P

P Chase

That's not an issue, your application can only run one version of the .NET
framework at execution time. Further, all versions of the framework are side
by side compatible.

Yes, but not for the reasons you think. 3.5 SP1 actually installs all
service packs for 2.0 and 3.0. The 3.5 SP1 memory leak bug fix, if it exists
at all, would most likely be retrofitted in a service pack for earlier
frameworks. Don't install 3.5 SP1 if you haven't tested the previous SPs for
earlier frameworks. As Jon suggested, VPC is the best way to go.

I'll take a peak at the complete of bug fixes in 3.5 SP1 to see if any deal
with imaging memory leaks. If I find, I'll update this post. Otherwise,
assume I didn't find any.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively onwww.lulu.com/owc$19.99
-------------------------------------------------------


what memory leak are you seeing? You need to describe it better and give
some more details.
--
Regards,
Alvin Bruney [MVP ASP.NET]
[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively onwww.lulu.com/owc$19.99
-------------------------------------------------------

I am developing an application using Visual Studio 2005, Windows XP
(or 2003) and C#. I am using facilities of .Net Framework 3.0, but not
of 3.5.
I am falling foul of some memory leaks in the framework, which
Microsoft claim to have fixed in .Net Framework 3.5 SP1.
I confess to not really understanding how the various versions of .Net
Framework that have been installed on my machines are actually used by
the application.
So my question is: if the leaks really are fixed in 3.5 SP1, will
installing that service pack also fix the same leaks in 3.0?
(Of course, only the Beta of 3.5 SP1 is currently available, but I
could be brave and try it).
My question was not intended to be about the specific issue I am
facing, but the general issue of whether patching .Net Framework 3.5
would also affect my code which is a client of .Net Framework 3.0. I
don't understand how the various versions of .Net that have been
installed interact.
However, since you ask, I can also give details of the specific issue
I am trying to resolve.
I have a server application that uses FlowDocument to turn some text
and images into a nice-looking document. The FlowDocument is
constructed from XAML.
If the FlowDocument has no images in it, then when I am finished with
it, all memory is happily released. But if there are Image elements in
the XAML, then lots of memory is leaked, and the files providing the
image contents are held open.
I read that some image-related leaks in .Net Framework itself are
fixed by 3.5 SP1. So I want to know whether these might fix my issues.
I hoped to get an indication of the likelihood of this, before going
to the trouble of installing SP1, particularly if it might be
difficult to uninstall.

In the end, I was brave/foolish and just tried 3.5 SP1 on my main PC.
Nothing bad happened, but neither did the leak go away. So I guess
Microsoft aren't going to sort out this problem for me. I deinstalled
3.5 SP1 afterwards, and happily all still seems to be working.

Does anyone have any alternative ideas how I might be able to
persuade .Net to release the Images that it created, when parsing the
XAML text for my FlowDocument?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top