Reputation: 7
Look at the following codes
namespace WindowsFormsApplication1
{
public partial class myprogram : Form
{
public myprogram()
{
InitializeComponent();
}
WebKitBrowser wb1 = new WebKitBrowser();
private void timer1_Tick(object sender, EventArgs e)
{
timer1.Enabled = false;
wb1.Navigate("site.com");
timer2.Enabled = true;
}
private void timer2_Tick(object sender, EventArgs e)
{
timer2.Enabled = false;
wb1=null;
timer1.Enabled = true;
}
}
}
To empty RAM every time, wb1 must be null. But then it gets null and no longer hits and says it has already been null. So how can I get null in timer2 and then Navigate in timer1?
Upvotes: -2
Views: 47