Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 01/25/19 in all areas

  1. A generic list that doesn't use any heap memory? We show you a couple of ways to create one in our latest blog post! https://blog.grijjy.com/2019/01/25/allocation-free-collections/
  2. Arnaud Bouchez

    Allocation-Free Collections

    In fact, it is not allocation-free, it is heap-allocation free, since it needs to allocate its memory from the stack. And note that the stack size can be pretty limited... For instance, if the process is run within IIS, stack size is only 256KB (on 32-bit), which could be too small for using allocation-free collections everywhere. Under Linux, the default thread stack size can be pretty limited in comparison to Windows, too. What we do in practice in our servers code when we need such temporary storage, is to use a 4KB stack-allocated buffer, with optional heap allocation. See https://synopse.info/files/html/api-1.18/SynCommons.html#TSYNTEMPBUFFER There are some methods to pre-initialize the buffer with common patterns (zero bytes, increasing integers, random numbers).... But you need to use pointer arithmetic, whereas this article uses generics so may a little safer. 4KB is OS memory page size, so should already be there, and avoid to reach 256KB numbers.
  3. We made some changes to the low-level method call ABI in 10.3, which affects both Delphi and C++. This is likely to be invisible to you unless you do something very low-level. It's more visible to you if you use C++, because now an entire class of bugs has been fixed in one go. IMO, whether you use C++ or not, it's very interesting! Info here: https://community.idera.com/developer-tools/b/blog/posts/abi-changes-in-rad-studio-10-3
  4. Sue King

    Using dxgettext on Windows 10

    Nexus does not hook that function. I have checked with the Nexus team. I have found a work around in gnugettext.pas. In TGnuGettextInstance.ResourceStringGettext add a test for refcount = 0 so that it starts with if (MsgId='') or (ResourceStringDomainListCS=nil) or (ResourceStringDomainListCS.RefCount=0) then begin Result := MsgId; exit; end;
  5. mausmb

    Problems with Listview fmx 10.3 ,close application

    I'm affraid you won't get best UX&performance with livebindigs br, m p.s. If you have more complex ListView you can do it manually 🙂 with TAppearanceListViewItems... LItem.Objects.FindDrawable('name').Width:=LColWidth; // LItem.Objects.FindDrawable('name').Data:=yourdata
  6. Hey, that's the Delphi from my first job after university. It makes me feel nostalgic.
  7. Uwe Raabe

    Travis CI joins Idera

    Indeed! The time and effort to get a build project up and running (and actually doing what you want!) in ContinuaCI and FinalBuilder beats Jenkins by magnitudes.
  8. Another observation. The exception occurs only if the dictionary has the key and/or value of the string type. If I change it to Integer - the exception disappears. procedure TestDictErr_IntegerKey_OK; var Dict: TDictionary<Integer,TObject>; begin Dict := TDictionary<Integer,TObject>.Create; for var item in Dict do Writeln('Key = ', item.Key, 'Name = ', item.Value.ClassName); end; Well, I just found it. For procedure TestDictOK the compiler generates a pair of calls: call @InitializeRecord call @FinalizeRecord But for procedure TestDictErr it generates only call @FinalizeRecord Program tries to finalize not initialized record and falls. P.S. Is there a bug bounty program for Delphi? :) https://quality.embarcadero.com/browse/RSP-23417
  9. Ian Branch

    Single Instance of Dephi IDE?

    It's my warning that I already have Delphi open. ;-)
  10. Ian Branch

    Single Instance of Dephi IDE?

    And GExperts complains on the second and subsequent instances... ;-)
  11. Vincent Parrett

    Travis CI joins Idera

    Expect layoffs and outsourcing to contractors.. standard Idera practice. Some interesting comments on hacker news.
×