Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » How to handle a lack of memory
Re: How to handle a lack of memory [message #46288 is a reply to message #46285] Fri, 08 April 2016 09:09 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13976
Registered: November 2005
Ultimate Member
koldo wrote on Fri, 08 April 2016 09:00
Hello Mirek

For example there is a program with a virtual ArrayCtrl that takes data from a huge file.
If user selects and copy the data to the Clipboard, program may crash.


Well, I have to say that generally, this is one of areas where I am not really that much sure that used approach (Panic) is correct.

However, somewhat I suspect that here the sensible solution is rather checking the size of selection before starting the process. The advantage is that it would solve "freezing" problem too.

I know that it is not always possible. And sometimes such check is difficult - but making the code "memory exception safe" reliably is much more difficult than that, I am afraid...

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Please help! New transfer semantic issue!
Next Topic: [FIXED] ToUpper, ToLower,and ToAscii (char*, int) causes AssertFailed
Goto Forum:
  


Current Time: Sun May 12 11:23:55 CEST 2024

Total time taken to generate the page: 0.02688 seconds