Changeset 136:c3e65240f9fd in finroc_plugins_data_ports


Ignore:
Timestamp:
02.10.2018 11:52:27 (13 months ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
14.08
Children:
137:a51ce184f4f2, 140:aca37ccb431b
Phase:
public
Message:

Fixes subtle memory issue on shutdown: Makes port buffer pools always initially add an unused buffer to pool if underlying buffer pool class requires an unused buffer for safe deleting (before, inward-connected input proxy ports (standard implementation) with their initial data buffer still assigned would cause a memory error on deletion).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/tPortBufferPool.h

    r46 r136  
    124124    buffer_pool() 
    125125  { 
    126     AllocateAdditionalBuffers(data_type, initial_size); 
     126    AllocateAdditionalBuffers(data_type, std::max<size_t>(initial_size, tBufferPool::MinUnusedBuffersRequired())); 
    127127  } 
    128128 
Note: See TracChangeset for help on using the changeset viewer.