Content deleted Content added
m Fixing Lint errors from Wikipedia:Linter/Signature submissions (Task 31) Tags: Fixed lint errors paws [2.2] |
syntaxhighlight & fix lint |
||
Line 60:
While Java may be able to do escape analysis more often than C++, it can be used sometimes in C++. For example the following code:
<syntaxhighlight lang="text">
class Bar {
int inc(int i) { return i + 1 }
Line 70:
delete b;
}
</syntaxhighlight>
with this code the compiler can know, that b will never be used outside of the function foo. I agree that pointers make escape analysis harder, but under certain conditions the compiler can verify that varibles do not escape a funciton. BTW, I have not programmed in C++ in a long time. Thus I may have made some syntactic errors.
|