-
Realm Properties and Zero-Copy ArchitectureI've just realized this recently. Realm has backing fields for properties in case the object is used as a standalone object instead of a managed one. In this way, the Realm object can be reused like a normal POCO. Once the Realm object is managed, these backing fields won't be used by the properties anymore since the properties will now point to its corresponding value on the disk. Consequently, the backing fields will still occupy memory despite being unused. Since realm's objective is to have a zero-copy architecture to minimize memory usage, doesn't this violate that objective? Questions for ClarificationsSince I lack knowledge on the capabilities of assembly weavers, my statements above may not be true. How is memory technically conserved in the current version of this SDK? and if there's still further memory that can be conserved, I would also like to ask if there is already a solution that is currently being planned once source generators will replace the assembly weavers. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @daawaan, there are different points in your question, so I'll try to answer to all of them:
I hope this answer your questions! If something is not clear feel free to ask 😄 |
Beta Was this translation helpful? Give feedback.
Hi @daawaan, there are different points in your question, so I'll try to answer to all of them: