Похожие чаты

I think i get it, but not sure. By paasing

by reference the method code will be merged into the main function or any function that it will be called in and executed there, right?🤔

5 ответов

19 просмотров

u dont get what you mean by merging and so on, you might want to look up passing by reference vs passing by value the essential difference is that when you are passing by reference the passing instance must be definded beforehand and you are usually saving the costs of the copy operation

More like passing by reference only copies a pointer, and not the rectangle itself

Amir- Автор вопроса
Sunbro
u dont get what you mean by merging and so on, you...

Isn't that case when passing by value as well?🤔the instance should be defined before hand either way, right? I'll look it up more, the notes that i took from the course few days ago says these stuff, guess i'll watch them again or just look it up online

Amir
Isn't that case when passing by value as well?🤔the...

Let's say your rectangle object takes up 10MB Without the pointer, you would be copying 10MB into the stack and then running the function (jumping to the function code) With the pointer, you copy 8 bytes (1 pointer) into the stack of the function, and then run it (the pointer pointing to the 10MB already in memory somewhere else)

Amir- Автор вопроса

Похожие вопросы

Обсуждают сегодня

30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
Also, why can’t the community have a vote/ say when it comes to initiatives like buybacks. Isn’t the point of crypto decentralisation? Don’t we deserve input as long term supp...
👨🏽‍🦰
13
Чёт не понял, я ж правильной функцией воспользовался чтобы вывести отладочную информацию? но что-то она не ловится
notme
18
Привет)) уже кажется эту тему перемусолили, но вот я так и не понял. Я сейчас сижу на 27дюймов 2к мониторе. На Актуальной макоси, если я куплю 27д 4к монитор: - будет ли изобр...
Vladislav Piskunov
15
any reference of this implementation?
BitBuddha
29
Hi guys, any problem with Pulsebrige? Trying to transfer from wETH to ETH. First it tells me to connect my metamask "through mobile app" not desktop. Then I did and confirmed ...
Snowflakecrypto
13
У меня есть функция где происходит это: write_bit(buffer, 1); write_bit(buffer, 0); write_bit(buffer, 1); write_bit(buffer, 1); write_bit(buffer, 1); w...
~
13
Страшнейшая правда про списки ЦБ. С первых дней жизни P2P сферы, молодые человеки, начитавшись законодательной базы и "внутренних" документов, решили, что им противостоит сер...
Foxcool
3
Карта сайта