Re: [Quickfix-developers] quickfix memory leak
Brought to you by:
orenmnero
From: K. F. <kfr...@gm...> - 2014-09-12 23:18:00
|
Hi Oren! Thanks for your reply. On Fri, Sep 12, 2014 at 11:53 AM, <or...@qu...> wrote: > We have been pretty conservative up until this point, but that was > largely due to how poor and divergent compilers were when the project > first started. > ... > We are also starting to get more aggressive dropping out of date > toolchains. We supported VS6 for a long long time, but we now only > supports VS10 and up. > > The philosophy on the whole has been to get quickfix up and running for > people with as few dependencies as possible. I like that philosophy. (But why then xml? That was the one thing that caused me the most nuisance "porting" QuickFIX to mingw_w64.) > That left libraries like boost out. I wholeheartedly agree. Boost has some good stuff in it, but it's hugely bloated. I think there may be some conceit on boost's part. (Our code don't stink ...) Why should I have to download a template-metaprogramming state-machine framework just to use a smart pointer? Boost really ought to make a (small) base library of low-level utilities that are clearly broadly useful (e.g. smart pointers). Then they could implement all of their whiz-bang experiments in separate add-on libraries. > ... > With the > latest 1.14.1 coming out, we were able to drop the dependencies on > libxml2 and msxml. This made our PyPI installation a lot easier too. As noted above, xml was something of an issue for me. How did you get rid of the libxml2 / msxml dependency? > I feel that if anyone is running a legacy system that old, they must > really love legacy software and can continue to use previous stable > releases of QuickFIX. Personally, I agree with this. But I understand and respect that many projects take a more legacy-focused approach. But I'm with you guys -- keep moving forward! > I'd really like to use more of C++11. In fact I was looking to convert > all our std for loops to range based loops, but alas VS 2010 doesn't > support them. They make the code so much cleaner. (Then drop VS 2010. Hee-hee ...) Another, more substantive change you could make would be to switch your threading to c++11's std::thread (and friends). Let the tool vendors (i.e., VS and gcc) worry about the platform-specific code. std::thread is broadly supported now, among others, by VS, gcc on linux, and gcc on windows (mingw-w64). Best regards. K. Frank >> -------- Original Message -------- >> Subject: Re: [Quickfix-developers] quickfix memory leak >> From: "K. Frank" <kfr...@gm...> >> >> Hi Oren! >> >> On Fri, Sep 12, 2014 at 12:49 AM, <or...@qu...> wrote: >> > >> > So it turns out there was a leak here. The returned copies were not >> > being stored in that collection and were never disposed of. I solved >> > this right now by putting them in std::shared_ptr objects. >> > ... >> > I think it would be nice to be able to use some modern smart pointers. >> > When the project was started back in 2001, there was really nothing >> > standardized that was widely distributed other than the dependency >> > monster boost. Now that there is I think it would help us avoid these >> > types of memory pitfalls. >> >> I would personally advocate for the use of std::shared_ptr (and other >> standard smart pointers, as appropriate), but, of course, this would >> make QuickFIX (partially) dependent on c++11. >> >> For me, that's fine (in fact preferable), but I understand that many >> users may have older toolchains that don't support the standard >> smart pointers (or other c++11 / c++14 features). What's been the >> QuickFIX philosophy about adopting new language features when >> they're beneficial? >> >> Thanks. >> >> K. Frank >> ... |