Re: [Development] Releasing memory after clear() in Qt containers (Qt 5.X)

2021-04-24 Thread Giuseppe D'Angelo via Development
On 24/04/2021 01:41, Kevin Kofler via Development wrote: This particular issue has come up so frequently in the last few weeks that this behavior change in Qt 6 sounds like a major design flaw of the Qt 6 QHash to me. Also because it subtly breaks source compatibility in a way the compiler cannot

Re: [Development] Releasing memory after clear() in Qt containers (Qt 5.X)

2021-04-24 Thread Francesc Martinez
Hi Giuseppe, Thanks for the help! I'll try to answer one by one to your questions. 1) clear() on a container doesn't (necessarily) release all the memory > held by that container. For instance std::vector / Q5Vector retain the > allocated capacity: A Q5Hash will release the memory held by the