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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T13:33:58+00:00 2026-05-10T13:33:58+00:00

In a world where manual memory allocation and pointers still rule (Borland Delphi) I

  • 0

In a world where manual memory allocation and pointers still rule (Borland Delphi) I need a general solution for what I think is a general problem:

At a given moment an object can be referenced from multiple places (lists, other objects, …). Is there a good way to keep track of all these references so that I can update them when the object is destroyed? ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­

  • 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. 2026-05-10T13:33:59+00:00Added an answer on May 10, 2026 at 1:33 pm

    If you want to notify others of changes you should implement the ‘Observer Pattern’. Delphi has already done that for you for TComponent descendants. You can call the TComponent.FreeNotification method and have your object be notified when the other component gets destroyed. It does that by calling the Notification method. You can remove yourself from the notification list by calling TComponent.RemoveFreeNotification. Also see this page.

    Most Garbage Collectors do not let you get a list of references, so they won’t help in this case. Delphi can do reference counting if you would use interfaces, but then again you need to keep track of the references yourself.

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

Sidebar

Related Questions

still new to the world of linq, and i need some help flatening a
The manual page for XML::Parser::Style::Objects is horrible. A simple hello world style program would
Maybe world peace would be easier, but I have a problem with the widths
What are real-world problems where a recursive approach is the natural solution besides depth-first
I'm using the Hello World with Ant tutorial from the Ant manual to learn
I have a string like hello /world today/ I need to replace /world today/
If a 32bit Operating System operated with a segmented memory model would their still
As a long time World of Warcraft player, and a passionate developer I have
I'm building the world's simplest library application. All I want to be able to
What real-world projects would you suggest looking through the sources? As I'm learning Java

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.