-
Content Count
3469 -
Joined
-
Last visited
-
Days Won
171
Everything posted by David Heffernan
-
Trojan:Script/Sabsik.TE.A!ml detected (false positive of course)
David Heffernan replied to Clément's topic in RTL and Delphi Object Pascal
I use an EV code signing certificate -
D2007: Initialise byte array in const record
David Heffernan replied to Nigel Thomas's topic in Algorithms, Data Structures and Class Design
No, this is not possible in Delphi 2007. You can declare typed constants for fixed length arrays, but not dynamic arrays. -
D2007: Initialise byte array in const record
David Heffernan replied to Nigel Thomas's topic in Algorithms, Data Structures and Class Design
Sorry, content removed, I'm talking nonsense. -
D2007: Initialise byte array in const record
David Heffernan replied to Nigel Thomas's topic in Algorithms, Data Structures and Class Design
Sorry, content remove, I'm talking nonsense -
Delphi and "Use only memory safe languages"
David Heffernan replied to Die Holländer's topic in General Help
Isn't the reason that Delphi is good at building GUI apps, at least it was for vcl back in the day. And it's still good for pure Win32 apps. -
Yeah, use threads
-
You need try/finally to avoid potential leaks. There are basically two main object creation patterns that you have to learn. You can't get far without them.
-
Record operator overloading, can use undocumented return type
David Heffernan replied to Khorkhe's topic in RTL and Delphi Object Pascal
Can you link the documentation you refer to so that there is no ambiguity in the question- 5 replies
-
- record
- operator-overloading
-
(and 1 more)
Tagged with:
-
Disabled floating point exceptions are problematic for DLLs
David Heffernan replied to A.M. Hoornweg's topic in Delphi IDE and APIs
That's easy to fix. You just make sure that they call internal methods only. Not really. You can store the FPCR to a local variable in the exported method. The thing is, the change in Delphi 12 isn't actually causing any new issues. These issues always existed. It's just a consequence of the "design" of DLLs not making FPCR part of the ABI. -
Disabled floating point exceptions are problematic for DLLs
David Heffernan replied to A.M. Hoornweg's topic in Delphi IDE and APIs
One very obvious problem is that you need to write code like this everywhere. Not just at the top level. I stand by my advice before. Either: 1. Make FPCR part of the contract, or 2. Take control on entry, and restore on exit. -
Disabled floating point exceptions are problematic for DLLs
David Heffernan replied to A.M. Hoornweg's topic in Delphi IDE and APIs
This is the worst advice I've seen in quite some time!! -
Disabled floating point exceptions are problematic for DLLs
David Heffernan replied to A.M. Hoornweg's topic in Delphi IDE and APIs
DLLs should take charge of this. They should either make it part of their contract that the host sets the fp control state to a specific state. Or they should set it on entry, and restore it on exit. My DLL does the latter. -
It's time to start using revision control
-
Why are you using ShellExecute. That's a deprecated function that used to be used to execute shell actions, but has been replaced by ShellExecuteEx. If you want to execute a specific program why aren't you using CreateProcess?
-
This is pretty epic, let's be honest. Take all the drudge out, and let us work on the brain stuff.
-
Delphi and "Use only memory safe languages"
David Heffernan replied to Die Holländer's topic in General Help
That's kind of a vague specification. For instance, is the data pushed or pulled? I would imagine that makes a difference. -
Delphi and "Use only memory safe languages"
David Heffernan replied to Die Holländer's topic in General Help
The real trick there is not to do it. Avoid it at all costs. -
Delphi and "Use only memory safe languages"
David Heffernan replied to Die Holländer's topic in General Help
I don't really understand this. I always write the try/finally immediately after the construction, and always bang the Free in immediately. Then I fill out the body. It's just a habit that you form so that you don't make such mistakes. And honestly, this is never one that is hard to debug because you just have a leak. And presumably you use leak detection tools so that you'd always find them immediately. I don't really understand this scenario either. If you have a reference to something that may or may not exist, you would test Assigned() before using it. And when you were finished, you'd set the reference back to nil once you'd destroyed it. The scenario that is tricky is when you have multiple references to an object. -
Delphi and "Use only memory safe languages"
David Heffernan replied to Die Holländer's topic in General Help
Keep searching then -
Delphi and "Use only memory safe languages"
David Heffernan replied to Die Holländer's topic in General Help
It's odd you say that, but I never have to debug issues like this. There are two simple patterns for lifetime and they are so ingrained, nobody ever makes a mistake in my team. -
Delphi and "Use only memory safe languages"
David Heffernan replied to Die Holländer's topic in General Help
(PDF) Application of artificial intelligence in compiler design (researchgate.net) (ijresm.com) -
Delphi and "Use only memory safe languages"
David Heffernan replied to Die Holländer's topic in General Help
Yeah, you are wrong. Such people exist. I am one. Not necessarily. No reason why pointer arithmetic should be faster than, for example, plain indexing of arrays. Again, good compilers are often better than humans. I don't think pointers are used in the RTL especially more than other libraries, and I don't think pointers are used there fore for optimisation and performance. As far as this whole memory safety debate goes, you can't exclude the RTL from it. That code executes in the code that is subject to attack. -
I'm not quite sure what you are saying here? Are you looking to hire somebody?
-
What is the target Win 64 (Modern) in Delphi 12.1
David Heffernan replied to pyscripter's topic in Delphi IDE and APIs
This was in fact mentioned -
I guess they will be able to say that the numbers of bugs reported is going down and claim that indicates quality has improved.