/* * Copyright 2004 Perforce Software. All rights reserved. * * Developed by Data Shades Ltd. */ #include "StrBufArray.h" StrBufArray::~StrBufArray() { for ( int i=0; i<Count(); i++ ) { StrBuf *buff = (StrBuf *)VarArray::Get( i ); delete buff; } } void StrBufArray::Put( void *v ) { StrBuf *buff = new StrBuf(); *buff = (char *)v; VarArray::Put( buff ); } void *StrBufArray::Get( int i ) { StrBuf *buff = (StrBuf *)VarArray::Get( i ); return buff->Text(); } //Added by Jeremy Walker to fix memory leak. May, 2011 void StrBufArray::Clear() { for ( int i=0; i<Count(); i++ ) { StrBuf *buff = (StrBuf *)VarArray::Get( i ); delete buff; } VarArray::Clear(); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 11314 | Robert Cowham | Initial population of perforce_software version of P4OFC | ||
//guest/robert_cowham/perforce/API/p4com/main/src/StrBufArray.cpp | |||||
#3 | 10720 | Robert Cowham |
Built with Visual Studio 2010 (SP1) Updated to p4 api 2014.1 Uses Open SSL (latest) as a result of the above. A client workspace to use this looks like: //guest/robert_cowham/perforce/API/p4com/main/src/... //cowhamr-p4com-test/... //guest/robert_cowham/perforce/API/p4/p4api-2014.1.821990-vs2010_static/... //cowhamr-p4com-test/p4api/... //guest/robert_cowham/openssl/1.0.1j/out32dll/libeay32.lib //cowhamr-p4com-test/openssl-lib/libeay32.lib //guest/robert_cowham/openssl/1.0.1j/out32dll/libeay32.dll //cowhamr-p4com-test/ReleaseMinDependency/libeay32.dll //guest/robert_cowham/openssl/1.0.1j/out32dll/ssleay32.lib //cowhamr-p4com-test/openssl-lib/ssleay32.lib //guest/robert_cowham/openssl/1.0.1j/out32dll/ssleay32.dll //cowhamr-p4com-test/ReleaseMinDependency/ssleay32.dll |
||
#2 | 8063 | Robert Cowham | - Include patch from Jeremy Walker to fix StrBufArray memory leak. | ||
#1 | 4743 | Robert Cowham | Missed new files referred to by previous checkin. |