User Changes 3.0.4

From Lazarus wiki
Jump to navigationJump to search

About this page

Listed below are intentional changes made to the FPC compiler (3.0.4) since the previous release that may break existing code. The list includes reasons why these changes have been implemented, and suggestions for how you might adapt your code if you find that previously working code has been adversely affected by these recent changes.

The list of new features that do not break existing code can be found here.

Please add revision numbers to the entries from now on. This facilitates moving merged items to the user changes of a release.

All systems

Implementation Changes

Unit changes


TList auto-growth
  • Old behaviour: Lists with number of elements greater than 127 was expanded by 1/4 of its current capacity
  • New behaviour: Adds two new thresholds. If number of elements is greater than 128 MB then list is expanded by constant amount of 16 MB elements (corresponds to 1/8 of 128 MB). If number of elements is greater then 8 MB then list is expanded by 1/8 of its current capacity.
  • Reason for change: Avoid out-of-memory when very large lists are expanded


  • Old behaviour: In 3.0.2, TMemIniFile.ReadSectionValues did not read invalid name/value pairs
  • New behaviour: 3.0.4 reads invalid name/value pairs again.
  • Reason for change: Wrong defaults assumptions in 3.0.2, change is more delphi and 3.0.0 compat
  • Remedy: If you only want real name/value pairs, pass an additional empty set parameter to ReadSectionValues. if you need invalid lines and comments please pass [svoIncludeComments,svoIncludeInvalid]


TParam.LoadFromFile sets share mode to fmShareDenyWrite
  • Old behaviour: TFileStream.Create(FileName, fmOpenRead) was used, which has blocked subsequent access (also read-only) to same file
  • New behaviour: TFileStream.Create(FileName, fmOpenRead+fmShareDenyWrite) is used, which does not block read access to same file
  • Remedy: If your application requires exclusive access to file specify fmShareExclusive

Previous release notes