You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Identify some memory leaks in the Swagger classes.
Follow the corrections.
File: Swag.Doc.pas
Line: 261 Result.AddPair(fDefinitions.Items[vIndex].Name, fDefinitions.Items[vIndex].JsonSchema.Clone as TJSONObject);
File: Swag.Doc.Defnition.pas
Line: 73
if Assigned(fJsonSchema) then
FreeAndNil(fJsonSchema);
File: Swag.Doc.Path.Operation.RequestParameter.pas
Line: 208 vJsonObject.AddPair(c_SwagRequestParameterSchema, fSchema.JsonSchema.Clone as TJSONObject);
File: Swag.Doc.Path.Operation.Response.pas
Line: 147 vJsonObject.AddPair(c_SwagResponseSchema, fSchema.JsonSchema.Clone as TJSONObject);
Line: 189 fSchema.JsonSchema := pJson.Values[c_SwagResponseSchema].Clone as TJSONObject;
Hello, sorry for the delay.
You can actually use the DMVCFramework example "swaggerdoc".
The only difference is that I am using FastMM4.
I verified that if I don't use it, these errors don't occur, now I don't know if it's a delphi failure to not report this leak or FastMM4's failure!
Identify some memory leaks in the Swagger classes.
Follow the corrections.
File: Swag.Doc.pas
Line: 261
Result.AddPair(fDefinitions.Items[vIndex].Name, fDefinitions.Items[vIndex].JsonSchema.Clone as TJSONObject);
File: Swag.Doc.Defnition.pas
Line: 73
File: Swag.Doc.Path.Operation.RequestParameter.pas
Line: 208
vJsonObject.AddPair(c_SwagRequestParameterSchema, fSchema.JsonSchema.Clone as TJSONObject);
File: Swag.Doc.Path.Operation.Response.pas
Line: 147
vJsonObject.AddPair(c_SwagResponseSchema, fSchema.JsonSchema.Clone as TJSONObject);
Line: 189
fSchema.JsonSchema := pJson.Values[c_SwagResponseSchema].Clone as TJSONObject;
Source.zip
The text was updated successfully, but these errors were encountered: