Hello Bob,
On Sun, 2005-06-05 at 15:19, Bob Doan wrote:
> It's only used in rlib_layout_execute_pcodes_for_line
>
> It's used for things on a line (image, literal, text) that don't have a
> specific property that a line done. Like if a line had a bgcolor of
> 'red' but the field did not specify the bgcolor so the field would
> inherit the value of the line
>
> It's duped because the value is manipulated later in the code, then
> freed.
Well I commented it out, ran some test cases like:
<Line bgcolor="'0xefefef'">
<literal bgcolor="'0xffffee'" width="95" align="right">Total:</literal>
<field value="v.subtotal" format="'!$%(n'" width="11" align="right"/>
</Line>
And did not see any problems, no references to freed memory or things
like that.
>
> Most of the time it is kinda untouched and this is the one place in the
> RLIB code ref counting RVALS would be more efficient instead of
> duplicating. However moving to this would be a little work and odds are
> things would break. It might be a little late in the release cycle to
> tackle this one.
>
> But it you want to fix this and not break anything go for it ;)
>
> - bob
>
> On Sun, 2005-06-05 at 14:13 -0600, William K. Volkman wrote:
> > On the surface this code looks like it's designed to leak,
> > I can however imagine a use case so I thought I better ask.
> >
> > struct rlib_value * rlib_value_dup_contents(struct rlib_value *rval) {
> > if(rval->type == RLIB_VALUE_STRING)
> > rval->string_value = g_strdup(rval->string_value);
> > return rval;
> > }
> >
> > I'm going to comment it out and see what happens.
> >
> > https://lists.sourceforge.net/lists/listinfo/rlib-devel
|