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

FPC fix: incorrect usage of TPrecisionTimer.ProfileCurrentMethod in SynDBOracle #169

Merged
merged 2 commits into from Jan 3, 2019

Conversation

Projects
None yet
2 participants
@pavelmash
Copy link
Collaborator

pavelmash commented Dec 31, 2018

If result of TPrecisionTimer.ProfileCurrentMethod is not assigned to the local variable FPC destroy IUnknown immediately.
So for FPC we should either create a local IUnknown var, or not use a .ProfileCurrentMethod at all.
The second is better - in this case we do not create an unnecessary TPrecisionTimerProfiler class instance

@pavelmash pavelmash changed the title FPC fix: incorrect usage of TPrecisionTimer.ProfileCurrentMethod in SybDBOracle FPC fix: incorrect usage of TPrecisionTimer.ProfileCurrentMethod in SynDBOracle Dec 31, 2018

@synopse

This comment has been minimized.

Copy link
Owner

synopse commented on SynCommons.pas in 2ba20c2 Dec 31, 2018

typo
// - FPC TIP: ... to a local variable
(add a leading - and use "a" instead of "the")

Show resolved Hide resolved SynCommons.pas
@pavelmash
Copy link
Collaborator

pavelmash left a comment

@synopse Can it be merged now?

Show resolved Hide resolved SynCommons.pas
@synopse
Copy link
Owner

synopse left a comment

+1

@synopse

synopse approved these changes Jan 3, 2019

@synopse synopse merged commit a32f477 into master Jan 3, 2019

@pavelmash pavelmash deleted the fix/synDBOrecleTimerFPC branch Jan 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment