inproper use of SRW API in dwsXPlatform.TMultiReadSingleWrite

Issue #21 invalid
Алек Невашедело created an issue

InitializeSRWLock never used(should be in ctor), or even imported.

Comments (2)

  1. Eric Grange repo owner

    It is useless for Delphi objects, as per the doc

    "The InitializeSRWLock function is used to initialize a SRW lock dynamically. To initialize the structure statically, assign the constant SRWLOCK_INIT to the structure variable."

    the SRWLOCK_INIT constant is a null pointer, and Delphi objects fields are automatically initialized to zeroes (unlike C++ "new", which does not initialize fields to zeroes).

  2. Log in to comment