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

Redundant nils in destructors #1

Open
the-Arioch opened this issue Jan 22, 2013 · 3 comments
Open

Redundant nils in destructors #1

the-Arioch opened this issue Jan 22, 2013 · 3 comments

Comments

@the-Arioch
Copy link
Owner

destructor TZSheets.Destroy();
SetLength(FSheets, 0);
FSheets := nil;

Can empty dynarray be not-nil in FPC ?

@the-Arioch
Copy link
Owner Author

destructor TZStyles.Destroy();
SetLength(FStyles, 0);
FStyles := nil;

@the-Arioch
Copy link
Owner Author

destructor TXSLXZipHelper.Destroy(); - every line


destructor TZAttributes.Destroy();
begin
SetLength(FItems, 0);
FItems := nil;

destructor TZsspXMLWriter.Destroy();
setlength(FTags, 0) ;
FTags := nil;

destructor TZsspXMLReader.Destroy();
SetLength(FTags, 0);
FTags := nil;

@the-Arioch
Copy link
Owner Author

//Очищает массивы
procedure ZESClearArrays(var _pages: TZESaveIntArray; var _names: TZESaveStrArray);
begin
SetLength(_pages, 0);
SetLength(_names, 0);
_names := nil;
_pages := nil;
end;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant