Jump to content

David Heffernan

Members
  • Content Count

    3494
  • Joined

  • Last visited

  • Days Won

    172

Everything posted by David Heffernan

  1. I agree. My point is that OP keeps asking for buffering but that won't really help.
  2. Buffering isn't really going to help here, because the MM already does that in effect.
  3. I'm not sure what you are saying here. Writing to memory is just writing to memory. Be it some intermediate buffer or the memory block backing the stream. Can you explain what performance block you are trying to overcome. Reallocation is the only block I can see.
  4. Rather than buffering in this case I have a memory stream that doesn't use contiguous memory. Instead of a single memory block, it manages a list of equally sized blocks. This avoids any performance issues with repeated calls to ReallocMem. Is that the performance block you want to work around?
  5. David Heffernan

    Move a form a few pixels??

    Easier to replace the CRT monitor with an LCD
  6. Do you perhaps have code in different modules? Like code in an exe and a dll and the object is passed between the modules?
  7. I guess I'd be a bit concerned about floating point use here when Log10 returns an exact integer
  8. David Heffernan

    ShowModal does not show window after a few tries (It does not pop up)

    Seems like the problem is going to be in the code that we cannot see. Please make a minimal reproducible example.
  9. David Heffernan

    TBitmap32 to jpg (graphics32)

    Most likely if there was a leak it was in your code, that would be my best guess.
  10. David Heffernan

    TBitmap32 to jpg (graphics32)

    That would be due to a leak. Again though, I'm not aware that the VCL jpeg code leaks anything. Am I missing something?
  11. David Heffernan

    TBitmap32 to jpg (graphics32)

    I'm not aware that the VCL jpeg unit leaks. How are you measuring that?
  12. David Heffernan

    Creating my own .bpl

    I still don't really understand why people use packages other than for IDE plugins and components.
  13. Abs isn't going to help at all. The problem is that the compiler is seeing these values as 32 bit integers. Which is why I suggested the Int64 cast. But Brian appears to have the answer by the excellent method of reading the documentation. I should have done that!
  14. David Heffernan

    TBitmap32 to jpg (graphics32)

    I'm confused. The VCL ships with a JPEG encoder.
  15. Compiler sees these as 32 bit Integer. Does it help to write Int64(10000000000) .. Int64(99999999999) Also your case statement doesn't handle negative input values.
  16. It is utterly trivial to make such a thing using the exact same code as found in Random. You make a record that contains a seed and you add a method that uses that seed to generate the next sample, and then update the seed. If you have specific requirements for the properties of the PRNG then you may find the LCG used by Random doesn't meet them. In which case you'd need to decide what your requirements are.
  17. David Heffernan

    Conditional compiling - Delphi has a bug

    You can see exactly this in the original post above. That's not the question being asked though.
  18. David Heffernan

    IfThen Oddity...

    IfThen as a function sucks big time. Why can't we have a conditional operator?
  19. I'm not convinced by this. But then I was primarily reacting to what you wrote.
  20. Looking at the update are you sure the function takes pointer to pointer to pointer to struct?
  21. We don't know what PDoubleArray1 is because the definition isn't here. However, you pass @Testdoublearray which is a pointer to pointer to record. But the native code expects pointer to struct. Clearly a mismatch. Given the various edits that have gone on between the real code and the code you posted, this could be wrong.
  22. True, but so what? If you want slim executables you wouldn't be using Delphi at all.
  23. David Heffernan

    Modal dialog closes before user input

    Reason is exactly as I described in my first comment. Down and up come in pairs. If one part of your program responds to down and another to up then you can have a down up pair invoking two distinct actions. Down invokes form show modal, up invokes closing that form. More prosaicly, if there is a common uniform way to do something in the system, your default should always be to follow that common uniform convention.
×