troubleshooting Question

Record vs Class Type

Avatar of alexiat
alexiat asked on
Delphi
9 Comments1 Solution482 ViewsLast Modified:
I don't think this is a difficult question, but I'd like to understand this so I don't continue down a wrong path.

I understand that the difference between using a Record vs. a Class Type variable is that the record type uses local memory vs an object being allocated in dynamic memory.  My app uses a lot of memory so I am trying to use it as efficiently as I can.

I know there are a lot of variables involved here, but is there some kind of "basic" record size that is a kind of cutoff for "that should always be an object not a record" sort of thing?  Most sources I have found when researching this say something like "use records for small and simple data structures" but I'm not sure what "small" means.

I use a lot of records that are under 2k in size and a few up to 5k in size.  I realize this got a little wordy for a simple question.  Can anyone give me some guidance here?

Thanks.
ASKER CERTIFIED SOLUTION
MerijnB
Sr. Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros