Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / February 2008

Tip: Looking for answers? Try searching our database.

Manage the Allocate memory (every new object) on C# solutions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cnimrod@gmail.com - 10 Feb 2008 19:02 GMT
Hi,

I need to "catch" every object that is tring to be written to memory
(every line like String s = new String() and etc.)
Can I overload it? Can Ioverride it?
I need it to be general in all my solution and with out doing anything
specail in the other projects (like inheritance from interface or
abstract class).

Thanks,
Nimrod
Jon Skeet [C# MVP] - 10 Feb 2008 19:14 GMT
> I need to "catch" every object that is tring to be written to memory
> (every line like String s = new String() and etc.)

Why?

> Can I overload it? Can Ioverride it?

No.

> I need it to be general in all my solution and with out doing anything
> specail in the other projects (like inheritance from interface or
> abstract class).

The only way you could do this would be to hook into the profiling API
- which is designed for profilers rather than normal applications.

What are you trying to achieve?

Signature

Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet   Blog: http://www.msmvps.com/jon.skeet
World class .NET training in the UK: http://iterativetraining.co.uk

Cor Ligthert[MVP] - 11 Feb 2008 01:02 GMT
Nimrod,

It should be possible, however be aware that it will cost you a bunch of
memory probably multiple times from the memory that will be used by your
sample.

Cor
Ignacio Machin ( .NET/ C# MVP ) - 11 Feb 2008 16:27 GMT
Hi,

What are you trying to do?

Signature

Ignacio Machin
http://www.laceupsolutions.com
Mobile & warehouse Solutions.

> Hi,
>
[quoted text clipped - 7 lines]
> Thanks,
> Nimrod

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.