|
It's already cluttered up to death anyway. All strings are immutable objects. String manipulations create and destroy lots of small objects, that just hang around until the GC gets around to collecting them.
It's a nice idea on paper, but it also introduces problems that can't be fixed until the next GC, like memory fragmentation. The GC maintains the managed heap, compacting memory when it can and when it needs to. It's performance is also self-tuning. Having you just kill and forcibly collect any object you want just destroys the ability of the tuner to do it's job.
Your idea is actually introducing the ability to create more clutter for the GC, not less.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Ah, i see.
It was only a technical daydream, i just wondered why it wasn't done
Cheers
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
Because the GC never needs to visit dead objects (it only visits alive objects). So, you could easily implement a GC.Kill method all by yourself like this:
class GC
{
void Kill(object o)
{
}
}
See? Easy
|
|
|
|
|
Hullo,
IS it possible to build applications on .net and run them on a a freeBSD,linux or any other open source OS.
If so? To what degree would this work?
cheers
Waskira
The level of your experience depends on your view
|
|
|
|
|
Try the Mono Project.
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
I tired that one time. Took me weeks to get it working right on my Fedora Core 6 box and then it was still... I dunno'.. odd feeling...
|
|
|
|
|
Check out the Mono Mono[^] project.
It is not 100% feature complete when compared to the Microsoft .NET Framework, but it is pretty close.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
And they are playing serious catch up, so although it will unlikely ever be feature complete with the latest .NET version, it will probably be very close to 2.0 soon, an that's quite usable.
|
|
|
|
|
Is there a way to run a native Windows application if .NET is not installed on the target machine?
There was a way to do this with MS-DOS and Windows applications, by attaching a stub[^] application to the main executable. Then, if the application was launched in MS-DOS, the stub would run instead, usually providing a suitable error message.
Does something similar exist for .NET 2.0?
|
|
|
|
|
No the .net framework must be installed.
Ben
|
|
|
|
|
The .NET Framework must be install for the app to work.
You could create a stub, written in unmanaged C++ that MIGHT work, but I haven't heard of anything available or anyone writing one.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Dave Kreskowiak wrote: You could create a stub, written in unmanaged C++ that MIGHT work
Yes, but how?
The MS-DOS stub was trivial - it was just a one line .EXE that told you to go get Windows. It was added at link time by the /STUB linker argument. I can't find any documentation (apart from vague references to statements like ".NET will contain a win32 stub...") on how to do this - or even if such a thing is possible!
|
|
|
|
|
I have no idea. Because of the very specialized mature of what you want, I'd suspect that examples are going to be few and far between.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Could you not write an unmanaged C++ launcher, that checks if .NET is installed and if so runs the app, and if not gives a simple dialogue that informs the user to install it?
|
|
|
|
|
I think that stub will be there in the assembly. Try running a .net executable from MS-DOS. It will throw you the same old error message(This program can...)
Cheers,
Suresh
|
|
|
|
|
I think the difference here is that just because you are running in a dos shell the windows operating system was still installed. In this case we are taking about something that is not installed. There are three core dlls that run the .net framework. Without these a .net app will not run.
Ben
|
|
|
|
|
Hello ,
I am new in coding with c++ on the cisual studio 2.0 framework can someone help with this code , i am trying to implement clicking an exit button and calling the message::show function i get error message
Yes' : is not a member of 'System::Windows::Forms::Form::DialogResult'
private: System::Void exitButton_Click_1(System::Object^ sender, System::EventArgs^ e)
{
if(MessageBox::Show("Are you sure you want to exit this program?", "Close Application!", MessageBoxButtons::YesNo, MessageBoxIcon::Question) == DialogResult::Yes)
{
Application::Exit();
}
else{
return;
}
d
|
|
|
|
|
I think that should be DialogResult::OK .
|
|
|
|
|
Hi all..
I have two dropdown list boxes in an aspx page to which i have to load items from the database..When i run the application i am getting the following error...
Auto- attach to process '[3236] aspnet_wp.exe' on 'machine 171' failed
Someone help in this regard..very urgent..
Regards,
Balaguru
|
|
|
|
|
|
I require a software component to be added to an existing .net application(web based). The coponent or the software should posses the following features:
1. It should provide PC to Phone integration either on VOIP technology or TAPI or both.
2. It should provide automated phone dialing from phone number lists.
3. Transfer calls to other users internally.
4. Record conversations and provide automated call reports and statistics.
5. Every phone number in the system should be automatically clickable and the call details must be logged to that user.
6. The phone call must be recorded and stored as a sound file.
Can anyone help me to find any freewares or commercial products available in the market which can provide me the above features.
Thanks in Advance
----------------------------------
where there is a will there is a way
|
|
|
|
|
NasimKaziS wrote: require a software component to be added to an existing .net application(web based).
You want a "component" to do all this? Something that would be normally found in a suite of applications??
NasimKaziS wrote: Can anyone help me to find any freewares or commercial products available in the market which can provide me the above features.
This is something you would probably require an entirely new phone system for! I seriously doubt you're going to find an all-software solution to this.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Even i doubted the same, i need to report to my manager reg. this, thats y posted in codeproject just to ensure i didnt miss out anything..
TC
----------------------------------
where there is a will there is a way
|
|
|
|
|
I've been wondering this for a while now, and i'm not sure what the best way to deal with it is.
Basicaly, i have a scenario where data is coming into an aspx page that is tamperable by the user. In this case the Querystring.
I am creating a wrapper class that wrapps the Request and then attempts to parse and strongly type the Querystring values so i can expose them as typed nullable properties.
My question is, whether it is better to Throw an exception on parse failure, or raise an event that informs the invoking application that it failed, and then return null.
I have gone for the second solution becase of the speed over exceptions, but it's something i've been mulling over for a while now.
Generaly i'd rather raise exceptions only for programming state errors and have validation of user changable input handled more gracefully. I was just wondering what other peoples opinions on this are, and what they would recommend.
I recently moved into building more comprehensive exception models for my apps and have found that it removes a lot of the ambiguity from the code.
Cheers
Tris
-------------------------------
Carrier Bags - 21st Century Tumbleweed.
|
|
|
|
|
I wouldn't raise an exeption for validating a user's input. It is something you expect to be invalid rather than invalid information being the exception.
|
|
|
|