I know that there is the .Clear() method to call, but how should I do when I have nested structures like this:
CJAVal json_positions_list;
for(...){
CJAVal json_position;
json_position["account_number"] = account_number;
json_position["takeprofit"] = takeprofit;
json_position["digits"] = digits;
json_positions_list.Add(json_position);
}
Calling json_positions_list.Clear() will also free the memory of the internals json_position elements?
Should I iterate of json_positions_list and free the memory one by one?
I want to get rid of json_positions_list memory entirely, would a delete json_positions_list works? I read that the delete command only works when the object is created using the new statement,
@vivazzi Any help is appreciated, Thanks!
I know that there is the
.Clear()method to call, but how should I do when I have nested structures like this:Calling
json_positions_list.Clear()will also free the memory of the internalsjson_positionelements?Should I iterate of
json_positions_listand free the memory one by one?I want to get rid of
json_positions_listmemory entirely, would adelete json_positions_listworks? I read that thedeletecommand only works when the object is created using thenewstatement,@vivazzi Any help is appreciated, Thanks!