synopse / mORMot

Synopse mORMot 1 ORM/SOA/MVC framework - Please upgrade to mORMot 2 !
https://synopse.info
785 stars 324 forks source link

* Missing DocVariantType.Free #311

Closed HgAlexx closed 4 years ago

HgAlexx commented 4 years ago

Hello,

Without this free, there is sometimes an Access Violation exception in function ClearVariantTypeList of unit System.Variants which try to free this object which memory seams to be freed/corrupt.

ClearVariantTypeList loop the variable "LVarTypes: array of TCustomVariantType;" and call .Free if not nil.

Adding the DocVariantType.Free into finalization section of unit SynCommons calls TCustomVariantType.Destroy which correctly free the object and removes it from LVarTypes, removing the access violation.

Regards,

HgAlexx commented 4 years ago

The second commit is more of a feature request.

The way we use THttpServerApi, we need access to the full url, this second commit add property FullURL on THttpServerRequest and populate it with value from Req^.CookedUrl.pFullUrl

Regards,