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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:26:32+00:00 2026-06-13T07:26:32+00:00

I have a question similar to this , but in delphi. type TThreadPopulator =

  • 0

I have a question similar to this, but in delphi.

type
  TThreadPopulator = class(TThread)
  private
    _owner:TASyncPopulator; //Undeclared identifier
  end;

type
  TAsyncPopulator = class
  private
    _updater: TThreadPopulator;
  end;

Solution of mentioned question is not applicable to delphi

  • 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-13T07:26:33+00:00Added an answer on June 13, 2026 at 7:26 am

    See Forward Declarations and Mutually Dependent Classes documentation.

    type (* start type section - one unified section "to rule them all" *)
    
      TAsyncPopulator = class; (* forward declaration, it basically serves just to
      fix SizeOf(TAsyncPopulator) so compiler would be able to draft dependent types'
      in-memory layout. Down the CPU level `class` and `pointer` is the same, so now 
      Delphi knows SizeOf(TAsyncPopulator) = SizeOf(pointer) to compose further types *)
    
      TThreadPopulator = class(TThread)
      private
        _owner:TASyncPopulator;
      end;
        
      TAsyncPopulator = class (* the final declaration now, it should go WITHIN 
      that very TYPE-section where the forward declaration was made! *)
      private
        _updater: TThreadPopulator;
      end;
    
      ....
    
    type 
    (* now, that you had BOTH forward and final declarations for TAsyncPopulator 
       spelled out above, you finally may start another TYPE-section, if you choose so. 
       But only after them both, and never should a new `type` section be inserted 
       in between those declarations. *)
      ....
    

    Use the source, Luke! Your Delphi installation has full VCL and RTL sources for you to read and watch and learn. And it uses this template a lot. Every time when you ask yourself "how I could do it", just think along "how did Borland do it" and pretty chance that you can already get a ready-made example in Delphi-provided sources.

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

Sidebar

Related Questions

I have asked a question similar to this in the past but this is
I tried searching for this but couldn't find a similar question. I have a
I have checked this similar question, but the suggestions did not solve my problem:
I have a question similar to This one . But I want to implement
I have a question similar to this question but it is MonoTouch specific. When
I have posted similar question previously, but this time I am providing some code
My question is similar to this one but for a Rails app. I have
I have a question similar to this but in the context of L2S. I
I have asked a similar question to this but for GMail and I was
I have asked a similar question to this one already but I think it

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.