|
I'm not sure, I guess it may be possible to tell the GC to collect for everyone, but, telling it to collect at all is typically a bad thing to do in any case.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hello Christian,
Thanks for your quick answere!
Christian Graus wrote: I'm not sure, I guess it may be possible to tell the GC to collect for everyone
I will have a look of the GC members again.
Christian Graus wrote: but, telling it to collect at all is typically a bad thing to do in any case.
Yes it is!
Maybe there are some other suggestions on that!
All the best,
Martin
|
|
|
|
|
Martin# wrote: I was searching threw System.GC and System.Diagnostics.Process but couldn't find something usefull.
So I was wondering if it's possible to call the GC of an other managed process over an API or something I couldn't figure out?
No, you can't do that with the framework classes. You could of course expose a .NET object from your app and use remoting to talk to it, but that is way overkill, IMO.
Martin# wrote: The question is out of curiosity, because I was wondering how the ".Net Memory Profiler" does the GC.Collect over all generation, when it's performing a snapshot.
There's a CLR Profiling API[^] that allows you to do things like that. You write a COM object that implements a bunch of callbacks, and then by setting an environment variable, it gets instantiated in the target process and can process notifications, as well as query for information. The API is very rich, I even wrote something that can find undisposed objects here[^].
|
|
|
|
|
Hello Senthil,
Thank you very much for your valuable input!
Just had a short look. It's really powerfull for getting informations!
But I think there has to be a way forcing the GC on the other process.
If I do a snapshot with the profiler it automaticaly makes a GC.Collect (GEN#2).
EDIT Start:
Just had a closer look, and I think a havent understood it at the first hand!
I will give it a try, and let you know if it works for me.
EDIT End:
S. Senthil Kumar wrote: wrote something that can find undisposed objects here[^].
Very interesting, thanks for the link.
Have a nice day!
All the best,
Martin
modified on Friday, March 20, 2009 11:22 AM
|
|
|
|
|
Hi Martin(ex#),
how are you doing?
There are overloads of GC.Collect() that help you in collecting the generations within your own process (which you should not do). I suggest you don't start collecting garbage from others, there still is interesting stuff within IT.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Hi Luc!
I'm doing very fine, thank you.
Hope you are also doing well.
I recognized that you where off-codeproject for a while.
But it's good to see you back!
No worry about me collecting garbage!
I'm just interested how programs like the ".Net Memory Profiler" doing this task.
Wish you a nice weekend!
All the best,
Martin
|
|
|
|
|
Anybody plz help to solve the problem of dropdownlist with modelpopup.here i need to use modelpopup with dropdownlistbox. When i am trying to use selectedindex change the event of dropdownlistbox should fill the value of another field to the another textbox
.
|
|
|
|
|
If you can't work out where the ASP.NET forum is, or that you need to post code if we can fix it, then we can't help you.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I have a C# windows application uses Pervasive sql 2000i.
The database has file path consisting of DTA and DDF files. I am using DSN to connect to the database.
I want to Programatically providing Database file path to DSN using C#.
Is it possible to do that.
If yes, I want some relative source or the link..
Thanx in advance.
Ragards...
Bijay
|
|
|
|
|
HI
here is my code how show me the path in message box but i want to this path in text box what is the logic behind this
private void button3_Click(object sender, EventArgs e)
{
OpenFileDialog FD = new OpenFileDialog();
string filenname = "";
string path = "";
if (FD.ShowDialog() == DialogResult.OK)
{
filenname = System.IO.Path.GetFileName(FD.FileName);
path = System.IO.Path.GetDirectoryName(FD.FileName);
}
MessageBox.Show(filenname, "Filename");
MessageBox.Show(path, "Directory");
}
|
|
|
|
|
Mangesh Tomar wrote: string filenname = "";
string path = "";
This is kind of useless, don't you think ?
If you can't set the text value of a textbox, and you can't work it out, then it's really time to be buying and reading a C# book. I can't think of much that's more trivial. What have you tried ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Whats there in this .. ..
Are you playing with us or what. . ???
Its just txtbx.Text = System.IO.Path.GetDirectoryName(FD.FileName);
|
|
|
|
|
Here is my code which gives me full path of file and it work
if (FD.ShowDialog() == DialogResult.OK)
{
textBox1.Text = " " + FD.FileName;
}
thx for reply
|
|
|
|
|
Thats cool. ..
But please from now leave a reply stating that you got your query so we didnt reply you in a way this happened...
|
|
|
|
|
Dear Friends
i developed more than from how to get the form1 to form2 how to value get .... ur suggestions
example i need help
|
|
|
|
|
Hard to understand what you're saying exactly. What is krishan ? your name ? How is that a remotely useful subject.
Buy a book on C# and read it. Pay attention to the chapter on delegates.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hi all,
I am developing an excel automation addin in c# .net. I have its setup and msi too. Now, when i tried installing it on a test machine, the installation is all fine and i can also see the registry entry(of MyProject.Connect with LoadBehavior 3) being made in the hkey local machine. But, no registry entry is made in the hkey classes root!!! I am not able to find my GuidAttribute(EA0AA093-EB23-4BD5-B499-4A2D327FC4D9) in the 'hkey classes root\clsid'!!!
What could be the reason for this?! Kindly help me in this regard. Any suggestions and ideas are very much thankful.
Regards.
|
|
|
|
|
Because you've not registered your COM object ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
hey Graus, good to see you replying.
Well, at last i figured out and it has made the registry entries in 'hkey classes root' on the test machine.. but apparently am very surprised with the fact that, though I am not able to see MySample.Connect in 'Excel--Tools--Addins', my addin is working to some extent.
Actually my addin is supposed to generate a button in excel, on the addin-created CommandBar(which i call MyCommandBar). The button is showing up and all the forms resulting its click are showing up. however, the UDFs i defined in 'MySample.Connect.cs' are not being recognised!!! Why is this happening?! How am I able to see the button when there is no entry of 'MySample.Connect' in the 'Excel--Tools--Addins' list!!??
I need my UDFs to be working.
Regards.
|
|
|
|
|
I want one regular expression which is like to be the values cannot start with "SA" or "K"(case insensitive).Please do the needful ASAP. which is urgent for me.Thanks in advance
fttyhtrhyfytrytrysetyetytesystryrty
|
|
|
|
|
ok, you've been around for a while and still you ask something ASAP and it's urgent, an automatic negative response generator.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
'do the needful' does not make sense. It also seems to serve as a warning around here that the poster is clueless.
yadlaprasad wrote: which is urgent for me
Not for me, as it happens. As you have an urgent problem, what have you done to solve it ? What tools do you use for Regex, there are some excellent free ones, some are even on CP.
You don't need a regex, you can just check the start of your string with a substring function if you want.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
yadlaprasad wrote: cannot start with "SA" or "K"
How cruell, you are discriminating the letters sa and k!!
|
|
|
|
|
Hi,
here is my code from openfile dialog box i directly open the excel file but i want the total file path which i want to fetch in the text box suggest some thing
OpenFileDialog ofd = new OpenFileDialog();
ofd.Filter = "Excel|*.xls";
ofd.ShowDialog();
System.Diagnostics.Process.Start(ofd.FileName, "Fileselected");
|
|
|
|
|
Mangesh Tomar wrote: ofd.FileName
You already got it. Just assign this to textbox before you start the process.
|
|
|
|