Jump to content

David Heffernan

Members
  • Content Count

    3494
  • Joined

  • Last visited

  • Days Won

    172

Everything posted by David Heffernan

  1. David Heffernan

    Getters & Settters??

    I don't really understand this. If you need to make multiple instances of the same class that are to be initialised with different values, how are you going to do that? Why does doing that initilisation in a separate stage help?
  2. David Heffernan

    Getters & Settters??

    No, I don't think so.
  3. David Heffernan

    Getters & Settters??

    Seems like dogma to me. Are you really saying that if a method uses more than 5 values of input data then it needs to be passed via properties rather than arguments? Many problems with that. Let's consider just one, thread safety.
  4. David Heffernan

    Zip Compression library

    Is 32 bit OS still a thing these days? We are about to drop support for it and probably should have done so some time ago.
  5. David Heffernan

    Zip Compression library

    Very likely this would give a bad UX
  6. David Heffernan

    Zip Compression library

    That's trivial to deal with these days by putting all dependent DLLs into an assembly that sits alongside your executable.
  7. David Heffernan

    Getters & Settters??

    Just add more arguments. If they need to be provided, then there's no shortcut. You could make the point that when looking at the arguments at the call site you don't see the name of the parameter, but that's something that the tooling should provide you.
  8. David Heffernan

    Zip Compression library

    There was an issue with some older versions of Delphi where the zlib .obj files supplied by Emba with the RTL were compiled without optimisation and the performance was poor. Can't remember the version, but you'd be able to find the details by searching in Quality Portal to make sure you weren't suffering from that.
  9. David Heffernan

    Zip Compression library

    Given how poor the Delphi compiler is in terms of performance of generated code, I'd expect this to be slower. Is it?
  10. David Heffernan

    Zip Compression library

    I'd expect a 64 bit version to be faster.
  11. David Heffernan

    Zip Compression library

    Your program is 32 or 64 bit? There are fast third party components. You didn't say which ones you were using.
  12. David Heffernan

    Getters & Settters??

    The form isn't destroyed until Self is. But once ShowModal has returned the form can never be seen again. That's a leak.
  13. David Heffernan

    Getters & Settters??

    This leaks the instance
  14. David Heffernan

    Getters & Settters??

    Dalija explained why. So that there's no scope for essential arguments not to be set. To make it clear to the caller what must be provided by them.
  15. David Heffernan

    Getters & Settters??

    Easy to fix and 100% this is what you should do
  16. David Heffernan

    Getters & Settters??

    Why is it confusing?
  17. David Heffernan

    Getters & Settters??

    That sounds more like an argument to the constructor
  18. David Heffernan

    Getters & Settters??

    Do you mean for properties?
  19. David Heffernan

    if i changed the P4D DLLPath how to reload DLLs ?

    For a Python extension module. But a pure Python module isn't a DLL.
  20. David Heffernan

    if i changed the P4D DLLPath how to reload DLLs ?

    Thanks, this helps. None of this would be necessary if python modules unloaded their DLLs so I'm guessing that Python itself doesn't provide hooks to modules to let them do that. Or perhaps is it just that modules aren't in the habit of unloading their DLLs. I think it would be easy to do for extension modules. But I'm not sure how a Python module that loaded DLLs with ctypes would get a hook to unload them. Certainly it sounds like what OP is trying to do is not very viable. Especially if the Python code that is executed can be specified at runtime.
  21. David Heffernan

    if i changed the P4D DLLPath how to reload DLLs ?

    How do you find out which DLLs to unload?
  22. David Heffernan

    if i changed the P4D DLLPath how to reload DLLs ?

    Has this changed? I remember failing to do this, unload and reload the dll in my own wrapper of embedded Python. But that was very many years ago so things likely have changed.
  23. David Heffernan

    if i changed the P4D DLLPath how to reload DLLs ?

    I don't think embedded Python supports this scenario
  24. This kind of error is all too familiar when embedding Anaconda. I never have such troubles with vanilla Python.
  25. David Heffernan

    generics

    Stop trolling, that's my job!
×