IT討論區(179) - any update?

1001 回覆
0 Like 2 Dislike
2022-11-27 21:25:04
Pointer 原來有分dynamic allocate to heap / pointer to stack local variable 。。。
2022-11-27 21:31:32
fuck WebSecurityConfigureAdapter Depreciated
2022-11-27 21:50:28
手巴個po都講左 pointer還pointer allocation還allocation
你咁既話仲要諗pointer to global pointer to mmap pointer to video memory blar blar blar
2022-11-27 22:13:38
明了。。
pointer 是pointer
New 是new
2022-11-27 23:01:37
完全5識呢D嘢
我還能混下去嗎
2022-11-27 23:43:27
最純粹黎講 即係唔理啲類似type咩咩柒柒非必要而又trivial既構造 (yes pointer唔需要有type eg consider asm)
pointer is just a number that does not necessary support arithmetic. ie it is merely a handle, with implementation defined arithmetic


for POSIX, malloc return a pointer to a block, which does not need to be on heap (yes it can on stack, on global segment, on video memory, on disk, or on any fucking things as long as it support space)
https://pubs.opengroup.org/onlinepubs/007904975/functions/malloc.html

new “Creates and initializes objects with dynamic storage duration, that is, objects whose lifetime is not necessarily limited by the scope in which they were created.”
https://en.cppreference.com/w/cpp/language/new
And yes I can code an allocator that allocate on anywhere.
2022-11-27 23:51:27
Btw想講下pointer & resource management
啲咩free/delete好難呀 smart pointer 好難用呀 全部都係廢話
即係你fopen完會唔fclose既? 開左個connection會唔close既? lock完之後唔unlock既?
識呢啲就咪話唔識基本memory management。
唔識既一律當做開完任何野都唔識閂既傻閪。
2022-11-27 23:57:09
try with resources
2022-11-28 00:03:09
modern c++唔會用呢d c野啦
2022-11-28 00:03:42
邊間firm無old code base
2022-11-28 00:16:49
見到呢d一律
2022-11-28 07:34:46
咁tech 既我出返去先
2022-11-28 08:04:45
屌,神早流流就撞車塞車
2022-11-28 08:58:10
見過有人開db connection唔close
2022-11-28 09:15:17
有close係反常
2022-11-28 09:45:33
2022-11-28 09:50:06
2022-11-28 10:18:32
2022-11-28 10:18:57
2022-11-28 10:45:10
2022-11-28 11:04:42
2022-11-28 11:13:46
再嘈偷埋你份工
2022-11-28 11:19:51
2022-11-28 11:46:43
吹水台自選台熱 門最 新手機台時事台政事台World體育台娛樂台動漫台Apps台遊戲台影視台講故台健康台感情台家庭台潮流台美容台上班台財經台房屋台飲食台旅遊台學術台校園台汽車台音樂台創意台硬件台電器台攝影台玩具台寵物台軟件台活動台電訊台直播台站務台黑 洞