<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:58:48 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CXX-304] A large of Insertions maybe catch memory leak.</title>
                <link>https://jira.mongodb.org/browse/CXX-304</link>
                <project id="11980" key="CXX">C++ Driver</project>
                    <description>&lt;p&gt;When I use cxx driver to insert a large of documents, the memory of program is growing fast until 2GB. Then the program crashed. &lt;br/&gt;
I just test the insert function. When I get rid of the insertion code, the program   run normally.&lt;br/&gt;
Has the insert function any memory leak problem?&lt;br/&gt;
ie: like this: &lt;br/&gt;
while(1) m.insert(&quot;testdata&quot;, BSON(&quot;testdata&quot; &amp;lt;&amp;lt; 123));&lt;/p&gt;</description>
                <environment></environment>
        <key id="152186">CXX-304</key>
            <summary>A large of Insertions maybe catch memory leak.</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.mongodb.org/images/icons/priorities/blocker.svg">Blocker - P1</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="samantha.ritter@mongodb.com">Samantha Ritter</assignee>
                                    <reporter username="jebin">jebin</reporter>
                        <labels>
                            <label>legacy-cxx</label>
                    </labels>
                <created>Tue, 12 Aug 2014 15:32:35 +0000</created>
                <updated>Thu, 14 Aug 2014 15:23:13 +0000</updated>
                            <resolved>Thu, 14 Aug 2014 15:23:13 +0000</resolved>
                                    <version>legacy-0.0-26compat-2.6.3</version>
                                    <fixVersion>legacy-0.0-26compat-2.6.4</fixVersion>
                                    <component>API</component>
                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="690155" author="jebin" created="Thu, 14 Aug 2014 02:44:27 +0000"  >&lt;p&gt;Thanks Andrew. It&apos;s my compilation problem. Now i rebuild and fix the problem. Thanks again &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/wink.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="689844" author="acm" created="Wed, 13 Aug 2014 20:46:22 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=jebin&quot; class=&quot;user-hover&quot; rel=&quot;jebin&quot;&gt;jebin&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One thing to note: the build process you are using (documented here: &lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver/wiki/Download%20and%20Compile#building-multiple-windows-library-variants&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-cxx-driver/wiki/Download%20and%20Compile#building-multiple-windows-library-variants&lt;/a&gt;) is only applicable on the &apos;legacy&apos; branch. The 26compat branch does not offer the functionality required to support this. On the 26compat branch, all of these builds result in equivalent filenames for the libraries (both shared and dynamic). So only your last build (the one with --dynamic-windows) has any effect.&lt;/p&gt;</comment>
                            <comment id="688898" author="jebin" created="Wed, 13 Aug 2014 01:36:11 +0000"  >&lt;p&gt;sorry Ritter, now I attached my test file. Version of Mongodb is v2.6.3-64bit. The cxx driver&apos;s version i use is in branch 26compat. And i compiled with boost1.55, 32bit, vs2013 and windows7-64bit .&lt;/p&gt;

&lt;p&gt;The scons command following:&lt;/p&gt;

&lt;p&gt;scons --32 --prefix=&quot;K:\mongo-cxx-driver&quot; --cpppath=&quot;K:\boost_1_55_0&quot; --libpath=&quot;K:\boost_1_55_0\lib32-msvc-12.0&quot; install-mongoclient&lt;br/&gt;
scons --32 --prefix=&quot;K:\mongo-cxx-driver&quot; --cpppath=&quot;K:\boost_1_55_0&quot; --libpath=&quot;K:\boost_1_55_0\lib32-msvc-12.0&quot; install-mongoclient --dbg=on&lt;br/&gt;
scons --32 --prefix=&quot;K:\mongo-cxx-driver&quot; --cpppath=&quot;K:\boost_1_55_0&quot; --libpath=&quot;K:\boost_1_55_0\lib32-msvc-12.0&quot; install-mongoclient --dynamic-windows --sharedclient&lt;br/&gt;
scons --32 --prefix=&quot;K:\mongo-cxx-driver&quot; --cpppath=&quot;K:\boost_1_55_0&quot; --libpath=&quot;K:\boost_1_55_0\lib32-msvc-12.0&quot; install-mongoclient --dynamic-windows --sharedclient --dbg=on&lt;/p&gt;

&lt;p&gt;And now i found that if insert vector&amp;lt;BSONObj&amp;gt;, the memory growing slower than insert every BSONObjs.&lt;/p&gt;

&lt;p&gt;If the test file cant catch the problem for you, plz tell me what environment you used. &lt;/p&gt;

&lt;p&gt;Thanks a lot !!! &lt;/p&gt;</comment>
                            <comment id="688459" author="samantha.ritter@10gen.com" created="Tue, 12 Aug 2014 18:48:31 +0000"  >&lt;p&gt;Hi jebin,&lt;/p&gt;

&lt;p&gt;Could you please give me some more information about this problem?  What version of MongoDB are you running against?  Also, could you please provide a more complete code example that causes this problem for you?  I haven&apos;t been able to reproduce this problem yet.&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="49661" name="main.cpp" size="736" author="jebin" created="Wed, 13 Aug 2014 01:18:58 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hs1avz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>132112</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>