Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory fix #715

Merged
merged 3 commits into from Nov 11, 2019
Merged

Memory fix #715

merged 3 commits into from Nov 11, 2019

Conversation

@audetto
Copy link
Contributor

audetto commented Nov 2, 2019

ImageInfo must be initialised by calling its c++ constructor (as it contains std::string).

In VS it seems to work (by chance?), in g++ it fails.
C++ standard requires the constructor anyway.

audetto added 2 commits Nov 2, 2019
…mory.

The std::string constructor must be called
(it might still work with some std implemnetations e.g. VS, but this is not guaranteed by C++ standard).

Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
source/DiskImage.cpp Outdated Show resolved Hide resolved
@audetto

This comment has been minimized.

Copy link
Contributor Author

audetto commented Nov 3, 2019

I think there is a more elegant way to handle this but it requires a newer c++.

struct AStruct
{
    int a_number = {};
    double another = {};
};
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
@audetto

This comment has been minimized.

Copy link
Contributor Author

audetto commented Nov 10, 2019

I've removed VirtualAlloc and simplified the code. Nothing else to push on this branch.

IMHO, it is ready to be merged.

@tomcw tomcw merged commit d6d76ae into AppleWin:master Nov 11, 2019
@tomcw tomcw added this to the 1.29.5 milestone Nov 11, 2019
@audetto audetto deleted the audetto:memory-fix branch Nov 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.