[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Stories from static analysis of the Octave code base
From: |
al davis |
Subject: |
Re: Stories from static analysis of the Octave code base |
Date: |
Tue, 8 Jan 2019 14:27:01 -0500 |
On Sat, 5 Jan 2019 10:27:56 -0800
Rik <address@hidden> wrote:
> Is there a way to guarantee when a library is
> loaded that a particular piece of code is executed? I kind of think not.
Yes ... A static constructor.
class BOB {
BOB() {
// code to run when library is loaded
}
~BOB() {
// code to run when library is unloaded
}
};
static BOB x;