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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:00:53+00:00 2026-05-26T06:00:53+00:00

I need to have undo+redo stack for a limited number of classes under my

  • 0

I need to have undo+redo stack for a limited number of classes under my control that has to be very very very fast and using RTTI and XML or streams is not feasible as the count of instances can be as high as 2000+ in nested object lists. The objects need to be copied into and out of via memento pattern and reloaded instantly.

Is there a way to clone objects by copying the memory and re-instantiating the objects from that memory?

  • 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-26T06:00:54+00:00Added an answer on May 26, 2026 at 6:00 am

    Hardly. You can easily copy the memory of an object, but part of that memory will be pointers in which case you only copy the reference. Those pointers can include strings and other objects as well.

    I think the best way is to inherit these classes from TPersistent (or any decendant) en implement the Assign method for each of them. That way, you can create a second instance and assign the object to that new instance. In the Assign implementation you can decide for yourself what data should be copied and what not.

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

Sidebar

Related Questions

I have a SL DataGrid that has two columns. I need to be able
I have a need to create a transactional process using an external API that
I'm developing a canvas graphical editor. I have already coded an undo-redo system that
I need to implement undo-redo functionality in my project. But it is very complex
I have need for a function pointer that takes two arguments and returns a
I need to have custom checkboxes which wasn't that tricky. I made checkbox_selector to
I need to have ALWAYS a background service that will synchronize my Android application
I have been trying to design the Undo/Redo functionality in one of my app
Our team decided that we need our own custom Rich text box control for
I have some methods that need to run as a certain service account, so

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.