Archive
Friday, 12. May 2017
1
vote

How to create an operator overload that only accepts nil
Delphi sorcery
– Since the introduction of Nullable types in Spring4D they had a problem: assigning null to them was cumbersome. Some time ago you could implicitly assign a Variant to them which made it possible to assign Null. However that caused some issue because of implicit Variant type conversion.Imagine you ...
Thursday, 11. May 2017
0
votes

I wish I had dcc32 -dontmakemycodeslow
Delphi sorcery
– Quick, what is wrong with this code performance wise?function TWhereIterator<T>.MoveNext: Boolean;var current: T;begin Result := False; if fState = STATE_ENUMERATOR then begin fEnumerator := fSource.GetEnumerator; fState := STATE_RUNNING; end; if fState = STATE_RUNNING then begin ...
4
votes

Using Threads Snapshot tool as postmortem debugger
EurekaLog Blog
– This article will show you how to register and use Threads Snapshot tool to capture call stacks of unhandled exception crash of any process. When application throws exception which is not handled by application's code (so called "unhandled exception") - a system will attach external "debugger" to ...