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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:42:52+00:00 2026-05-26T16:42:52+00:00

I occasionally find myself passing this or Me to a child object. Such as

  • 0

I occasionally find myself passing this or Me to a child object. Such as this condensed real-world example…

Public Class Entity

    Private mValidator as New EntityValidator()

    Readonly Property IsValid()
        Return mValidator.Validate(Me)
    End Property

End Class

I’m concerned about .Validate(Me). I get no warnings or Code Analysis violations, but it just feels wrong. I get nervous about infinite recursion and garbage collection.

We have memory leaks on a project and I’ve wondered if it was due to this. I’ve never been able to find any resource that addresses the issue.

Is this practice OK, or is my paranoia deserved?

  • 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-26T16:42:52+00:00Added an answer on May 26, 2026 at 4:42 pm

    Circular references are allowed in VB and in C#. A reference is essentially little more than a value of the size of a machine WORD in memory. If there’s an object A and B, and if A points to B and B points to A, then A internally just holds a value that points to the actual object B and B just has a value that points to the actual object of A.

    Someone else explains circular references better than I can, try this thread, about circular references and check the first answer. But in short: no, they won’t harm your program and they are allowed and valid, even common.

    If you want to find out where your memory leak is coming from, try memory profiling.

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

Sidebar

Related Questions

I find myself in this position occasionally, and I'm sure there is a better
I find myself writing this class often in my python code when I need
I occasionally find myself with several methods in a class that all require the
Possible Duplicate: Can you define “literal” tables in SQL? Occasionally I find myself in
I find myself occasionally in C# 3.0 looking for ways to simulate the notion
I occasionally find myself starting and stopping multiple windows services. The only tool I'm
I occasionally find myself needing certain filesystem APIs which could be implemented very efficiently
I'm relatively new to Ruby on Rails and occasionally I find this convention-over-configuration stuff
In C#, I find myself occasionally wanting to register a method for an event
I find myself writing delegates occasionally for really simple functions (take no arguments and

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.