Skip to content
  • Stephan Seitz's avatar
    Bugfix: call cudaFree before resize of gpuVectors_ · 3559579d
    Stephan Seitz authored
    How could this have been working until now?
    We should not call `cudaFree` on uninitialized memory.
    
    We have to free the old pointers before resize. This also prevents
    memory leakage in case the vector gets shrinked.
    
    Apparently the previous code relied on the fact that `resize` somehow
    initialized the memory to null pointers or that `cudaFree` just ignores
    pointers it didn't allocate.
    3559579d