Closed clinuxrulz closed 5 years ago
If the ordering of the two lines are important, we can wrap a register
and deregister
on the outside of the disconnect/connect of the inner vertex.
Note this memory bounce is only observable in a situation we'd be making use of Cell::tracking . As we'd normally have a lambda1 somewhere keeping sodium objects alive that we may switch to.
This only applies to typescript for its unique (but nesassary) way of mananging memory.
These two lines in switchS and similar lines in switchC.
Notice how we are decrementing ref count of the previous inner vertex before incrementing the ref count on the next inner vertex. Any vertices that are the same in the long chain of vertices connect from the inner vertex could have a memory bounce, likewise for switching to the same inner vertex twice. Doing the increment ref count before the decrement ref count (swaping the order), could save the machine a bit of work.