Opened 8 years ago

Last modified 8 years ago

#10024 new Bugs

allocator memory leak

Reported by: anonymous Owned by: Chris Newbold
Milestone: To Be Determined Component: pool
Version: Boost 1.55.0 Severity: Problem
Keywords: Cc:

Description (last modified by viboes)

hi~ boost allocaltor memory leak bug.

stl + boost allocator

check crtdbg.h

sample code.

#include "stdafx.h"
#include <string>
#include <vector>
#include <boost/pool/pool_alloc.hpp>
#include <crtdbg.h>
int main()
{
    _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); 
    typedef std::vector<int, boost::pool_allocator<int>> Ints;
    Ints i;
    i.push_back(10);
    return 0;
}


that code memory leak. not call free.

Change History (4)

comment:1 by anonymous, 8 years ago

use boost ver 1.55

comment:2 by anonymous, 8 years ago

Version: Boost 1.54.0Boost 1.55.0

comment:3 by viboes, 8 years ago

Description: modified (diff)

comment:4 by viboes, 8 years ago

Component: Nonepool
Owner: set to Chris Newbold
Note: See TracTickets for help on using tickets.