Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7884139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:43:05+00:00 2026-06-03T04:43:05+00:00

I’m writing an application that spawns and kills a Chrome Browser. While I’m killing

  • 0

I’m writing an application that spawns and kills a Chrome Browser. While I’m killing the process programatically (same effect as killing process through Windows Task Manager), it’s been suggested that this may also result in memory leak–ie from elements such as kernel resources that were not properly associated w/ the originating process.

Is it possible to for an application to leak memory or otherwise have irreclaimable memory after the Process has been killed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:43:07+00:00Added an answer on June 3, 2026 at 4:43 am

    Killing a process in task manager directly could result in memory leak.
    An evidence is keeping killing “explorer.exe” will slow down the entire OS.

    Each Chrome window has a GUI process and a background process for each active tab. Background processes is reponsible for fetching page content, sending request / posting data, and hold fewer kernel object handles than GUI processes.
    Any programming framework will have at least two methods to close an active process. For example, in .NET, Process class has these two methods:

    1. CloseMainWindow()
      • Sends a WM_QUIT message to the main window message loop to request to close the process. This gives the program a chance to reinvoke its child window and its kernel objects.
    2. Kill()
      • Forces a termination of a process, same as killing the process in task manager. This is the only way to close background process. but when this applies to GUI processes, this doesn’t trigger all GUI/kernel events to release resources. Kernel objects include GDI objects, file/printer handles, database/network connection contexts, etc.
        Releasing these resources take some time while tracking down the entire memory linked list/map to deallocate kernel objects’ resources.
        Even .NET/java has its garbage collector to release “managed” memory for sure, kernel objects’ unmanaged resources are not always covered.

    The following is a test app in .NET C#. We can compare CloseMainWindow() to Kill() using a Visual Studio add-on: Memory Profiler. In almost all cases, Kill() is faster but has less memory released by checking “root references” and “instance references” in real-time memory graph.

    private Process _chromeProcess = new Process();
    
    private void bntCreate_Click(object sender, EventArgs e)
    {
        string chromePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
            @"Google\Chrome\Application\chrome.exe");
    
        _chromeProcess.StartInfo = new ProcessStartInfo(chromePath, @"-app=http://localhost:(a local Web site)");
        _chromeProcess.Start();
    }
    
    private void btnKill_Click(object sender, EventArgs e)
    {
        _chromeProcess.Kill();
        _chromeProcess.WaitForExit();
        _chromeProcess.Close();
    }
    
    private void btnClose_Click(object sender, EventArgs e)
    {
        _chromeProcess.CloseMainWindow();
        _chromeProcess.WaitForExit();
        _chromeProcess.Close();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I need a function that will clean a strings' special characters. I do NOT
I am writing an app with both english and french support. The app requests
I have thousands of HTML files to process using Groovy/Java and I need to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.