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

Qt5cpp plug memleaks #7695

Merged
merged 14 commits into from
Mar 7, 2018
Merged

Conversation

etherealjoy
Copy link
Contributor

@etherealjoy etherealjoy commented Feb 20, 2018

PR checklist

  • Read the contribution guidelines.
  • Ran the shell script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates). Windows batch files can be found in .\bin\windows\.
  • Filed the PR against the correct branch: 3.0.0 branch for changes related to OpenAPI spec 3.0. Default: master.
  • Copied the technical committee to review the pull request if your PR is targeting a particular programming language.

Description of the PR

Remove some Memory Leaks in the Model Factory and API

cc @fvarose @stkrwork @ravinikam

Plug some of the Qt Memory leaks.
Based on #7194 by @antis81

etherealjoy and others added 13 commits January 18, 2018 11:11
Actually the original solution is incomplete, because "innerType" maps to a single C++ type. Have a look at Qt's builtin QJsonObject::fromVariantMap.
…tch-1' into qt5cpp_plug_memleaks

# Conflicts:
#	modules/swagger-codegen/src/main/resources/qt5cpp/HttpRequest.cpp.mustache
#	modules/swagger-codegen/src/main/resources/qt5cpp/api-body.mustache
#	modules/swagger-codegen/src/main/resources/qt5cpp/helpers-body.mustache
#	modules/swagger-codegen/src/main/resources/qt5cpp/helpers-header.mustache
@antis81
Copy link

antis81 commented Feb 20, 2018

Gave it a short review. -> Looking good in general, only some tests seem to fail. Prbly those need a little adjustment…

@etherealjoy
Copy link
Contributor Author

etherealjoy commented Feb 20, 2018

Tests

  • PetStore Examples updated and passed
  • Docker API used for fetching container images and starting containers

@etherealjoy
Copy link
Contributor Author

Next set of updates planned would be to

  • QSharedPointer for member objects in the models
  • QSharedPointer for API Callbacks to ensure the memory de-allocation happens automatically after the callback has been invoked after the Endpoint API is called.

@etherealjoy
Copy link
Contributor Author

@wing328 Why does the circleci failed? I tested the petstore samples with the IDE and they passed.

@wing328
Copy link
Contributor

wing328 commented Feb 22, 2018

@etherealjoy probably due to maven repo throttling the connection to download dependencies.

I've restarted the job and the result is good.

@etherealjoy
Copy link
Contributor Author

etherealjoy commented Mar 5, 2018

Hi @fvarose @stkrwork @ravinikam
Any news :(
I was planning some updates in the future and I wanted to start on top of this.

@wing328 wing328 merged commit 12f3661 into swagger-api:master Mar 7, 2018
@wing328
Copy link
Contributor

wing328 commented Mar 7, 2018

@etherealjoy as always, thanks for your work 👍

@stkrwork thanks for reviewing the change.

@etherealjoy etherealjoy mentioned this pull request Mar 7, 2018
@etherealjoy etherealjoy deleted the qt5cpp_plug_memleaks branch March 15, 2018 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants