The proposed solution depends on knowledge of how things work internally (e.g. that buffers are allocated lazily). I think that something in the spirit of http://paste.ubuntu.com/6998792/ is cleaner (for a more robust solution we need to restore the previous context instead of just releasing the current one, or alternatively, not bind a new context at all if there is an active context already).
Note: I have tried it only on desktop, not N4, so there may be further complications.
A weak needs fixing... I prefer this solution over the proposed, and I think it's the Right Way (TM), but I can live with what is proposed (it's certainly more explicit than what we have now).
The proposed solution depends on knowledge of how things work internally (e.g. that buffers are allocated lazily). I think that something in the spirit of http:// paste.ubuntu. com/6998792/ is cleaner (for a more robust solution we need to restore the previous context instead of just releasing the current one, or alternatively, not bind a new context at all if there is an active context already).
Note: I have tried it only on desktop, not N4, so there may be further complications.
A weak needs fixing... I prefer this solution over the proposed, and I think it's the Right Way (TM), but I can live with what is proposed (it's certainly more explicit than what we have now).