Ask Your Question
0

What is a cost-effective method of holding two identical versions in memory without excessive copying?

asked 2021-12-18 11:00:00 +0000

bukephalos gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-09-08 05:00:00 +0000

devzero gravatar image

One cost-effective method of holding two identical versions in memory without excessive copying is by using pointers. Pointers are variables that hold the memory address of another variable. Both variables can point to the same memory location, allowing the identical versions to be stored in the same memory space. This method saves memory and reduces the need for excessive copying. Any changes made to one variable will also be reflected in the other variable.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-12-18 11:00:00 +0000

Seen: 8 times

Last updated: Sep 08 '22