mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps] Apps are not allocated on the heap anymore but in a union hold by
the AppsContainerStorage
This commit is contained in:
@@ -13,7 +13,18 @@ public:
|
||||
AppsContainerStorage();
|
||||
int numberOfApps() override;
|
||||
App::Snapshot * appSnapshotAtIndex(int index) override;
|
||||
void * currentAppBuffer() override { return &m_apps; };
|
||||
private:
|
||||
union Apps {
|
||||
public:
|
||||
/* Enforce a trivial constructor and destructor that just leave the memory
|
||||
* unmodified. This way, m_apps can be trivially destructed. */
|
||||
Apps() {};
|
||||
~Apps() {};
|
||||
private:
|
||||
APPS_CONTAINER_APPS_DECLARATION
|
||||
};
|
||||
Apps m_apps;
|
||||
APPS_CONTAINER_SNAPSHOT_DECLARATIONS
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user