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 7015143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:36:49+00:00 2026-05-27T22:36:49+00:00

My question is why we use delete operators for our objects? Does not .net

  • 0

My question is why we use delete operators for our objects?
Does not .net supply it for us?

Additionally, I write a small program with two buttons. In the first button I created an object and in the second button I delete it. I Look over the windows process explorer while the program is running, but when I clicked the second button the memory did not decrease. I did not understand the process?

  • 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-05-27T22:36:49+00:00Added an answer on May 27, 2026 at 10:36 pm

    The delete operator in C++/CLI doesn’t do the same thing as the operator in C++. Indeed, memory is managed by the garbage collector, you cannot release it explicitly. But objects can use additional resources beyond memory, most typically they are operating system handles or pointers to unmanaged heap memory. The garbage collector will release those too but that takes time. If the resource is expensive you’ll want to release it when you have no use for it anymore instead of waiting for the finalizer to take care of it. This is called disposing in .NET.

    Using delete on a button object has an immediate result, the button disappears. The window for the button control is one of those operating system resources. This will in general not reduce the memory usage. The handle count goes down.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

QUESTION: Re use of .NET Backgroundworker, is there not a way to let exceptions
I'm overloading new and delete to implement my own small-objects/thread-safe allocator. The problem is
Just found this out, so i am answering my own question :) Use a
I have a question regarding use of FFT. Using function getBand(int i) with Minim
Similar, but different to this question : I use highlight occurrences a lot, but
Question: How to use ssh & scp from the Windows command prompt? I remember
I have question regarding the use of function parameters. In the past I have
The solution to this question suggested the use of John Resig's class implementation. This
The answer to another SO question was to use this SQL query: SELECT o.Id,
I'm using lucene in my project. Here is my question: should I use lucene

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.