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

  • SEARCH
  • Home
  • 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 8706921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:44:14+00:00 2026-06-13T03:44:14+00:00

Ok so I do have a question about implementing interfaces in a WinForms application.

  • 0

Ok so I do have a question about implementing interfaces in a WinForms application. Basically I have a library of controls that I have built. Each control has an interface defined that interacts with the main form.

What I have been doing is creating a property handler that is the type of the interface and then doing it like this.

On the control:

public interface ITest {
    void Test1();
    void Test2();
}

private ITest _testHandler;

public ITest TestHandler { 
    get { return _testHandler; }
    set { _testHandler = value; }
}

On the Main form:

public MainForm : Form, MyControl.ITest { 

    public MainForm() { 
        InitializeComponent();
        MyTestControl.TestHandler = this;
    }

    // Implementing methods here...
}

The interface is working properly. I am just curious as to why it is taking up so much ram for each one. I don’t think that interfaces should really impact performance.

  • 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-13T03:44:15+00:00Added an answer on June 13, 2026 at 3:44 am

    Interfaces don’t take up memory; data does. You’re implementation classes (among other things) are what are actually taking up the memory.

    I would look for a memory profiler that would help you narrow down what’s taking up so much memory. It’s possible that you’e creating objects over and over again that aren’t necessary and could be improved with a Factory pattern that will cache objects that can be reused.

    Viausl Studio (I think the Premium and Ultimate versions) have a Performance Wizard that includes memory analysis (under the Analyze menu in VS 2010 and 2012)

    I have used Ants Memory Profiler and like it, but it’s not free. However it does have a 14-day free trial that mey get you over the hump.

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

Sidebar

Related Questions

I have a question about implementing the new UI within a .net website that
I have a question about implementing WYSIWYG editors into CakePHP. I'm developing an intranet
I have a question about implementing OnClickListeners for developing with the ADT. I'm unsure
I have a question about precompiling ASP.NET web application projects from TeamCity. This is
I have a question about interface and class implementing interface. This is my code:
I have a question about the Singleton Pattern and MEF. I'm new in implementing
I'm new to the play framework and I have a question about implementing ajax.
I have a fairly straightforward question about using droplets for my mac application. My
I have a question about implementing a few specific behaviors in NSTableViews/NSOutlineViews. WHAT I'M
I have a basic question about implementing a Entity code first one to many

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.