majintao0131 / yaml-cpp

Automatically exported from code.google.com/p/yaml-cpp
MIT License
0 stars 0 forks source link

Leak memory when parsing nested structure #62

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
with the yaml like this:
drugInfo:
  drug:
    id: 1
    half_life: 1
    epsilon_daily_effect: 0.8
    percent_kill_perday: 0.9999
    mutation_probability: 0.0005
    k: 4
    ResistantCostMulitipleInfectionLenght: 0.05
    ResistantCostMultipleInfection: 0.03
  drug:
    id: 2
    half_life: 1
    epsilon_daily_effect: 0.8
    percent_kill_perday: 0.9999
    mutation_probability: 0.0005
    k: 4
    ResistantCostMulitipleInfectionLenght: 0.05
    ResistantCostMultipleInfection: 0.03

It will cause a leak memory

Original issue reported on code.google.com by merli...@gmail.com on 21 Jan 2010 at 8:13

GoogleCodeExporter commented 9 years ago
You must be using the 0.2.4 release and not the latest revision. This was fixed 
in r328.

By the way, what you list above is not valid YAML - you are not allowed 
duplicate keys.

Original comment by jbe...@gmail.com on 21 Jan 2010 at 1:57