Git Product home page Git Product logo

Comments (1)

lazytiger avatar lazytiger commented on July 20, 2024

I have test the following code with valgrind

void test_issue() {
std::string html = "

1\n2\n
";
for (int i = 0; i < 5000; i++)
{

            CDocument d;
            d.parse(html);
            CSelection c = d.find("#something");
    }

}

valgrind --tool=memcheck ./example
==6641== Memcheck, a memory error detector
==6641== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==6641== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==6641== Command: ./example
==6641==
==6641==
==6641== HEAP SUMMARY:
==6641== in use at exit: 0 bytes in 0 blocks
==6641== total heap usage: 285,001 allocs, 285,001 frees, 10,925,066 bytes allocated
==6641==
==6641== All heap blocks were freed -- no leaks are possible
==6641==
==6641== For counts of detected and suppressed errors, rerun with: -v
==6641== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6 from 6)

I think the result is ok.

from gumbo-query.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.