lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fixes footnote automatic numbering. (issue 4877041)


From: dak
Subject: Re: Fixes footnote automatic numbering. (issue 4877041)
Date: Mon, 14 Nov 2011 11:34:25 +0000


http://codereview.appspot.com/4877041/diff/26012/lily/system.cc
File lily/system.cc (right):

http://codereview.appspot.com/4877041/diff/26012/lily/system.cc#newcode248
lily/system.cc:248: if (s->original ())
You don't check for success of the dynamic_cast before using it.  Is
that a problem?

http://codereview.appspot.com/4877041/diff/26012/lily/system.cc#newcode367
lily/system.cc:367: Grob *me = unsmob_grob (smob);
According to the compiler, getting the pointer me is the last operation
for which smob is needed.  After that, it is free for garbage
collection.

If you are not sure that other references to smob keep it from being
collected, you need to write
scm_remember_upto_here_1 (smob)
at the place where garbage collecting smob will no longer be a problem.

That's probably after all the relevant info is entered in grobs_scm.

http://codereview.appspot.com/4877041/diff/26012/lily/system.cc#newcode383
lily/system.cc:383: Spanner *sys_span = unsmob_spanner (smob);
See above regarding garbage collection. sys_span is not likely to be
kept around long enough when optimizing.

http://codereview.appspot.com/4877041/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]