C# 관리되는, 되지 않는 리소스 사용에 대한 문제점과 해결방법 Written by ProgC 2007-05-31 C#은 CLR에 의해 모든 것이 관리된다. 그로 인해서 메모리 해제를 까먹는다거나 하는 실수를 하지 않게 된다. 실제 필자도 C계열 언어를 10년이 넘게 사용해오면서 메모리 관리가 그다지 쉽지 많은 않다는 것을 피부로 느꼈다. 근래 C#으로 프로그램을 작성하면서 굉장히 많은 이득을 얻을 수 있었는데 그 중 하나가 메모리 관리에 대한 부담이 사라진다는 점이다. C#에 마법은 없다. 관리되지 않는 리소스를 사용할 경우에 메모리 릭이나 프로그램이 멎어 버리는 현상이 발생하기 때문이다. 이러한 프로그램들이 문제인 것은 프로그램을 실행시켜보고 바로 다운되지는 않는다는 점이다. 단지 서서히 죽어갈 뿐이..
시간을 계산해야 할 일이 필요했다. 내가 필요했던 부분은 경매사이트에서 DB에 들어있는 마감시각을 가져와서 현재시각과 계산하여 남은 시간을 계산하기 위해서였다. C#에서 DateTime이 시간이다. 보통 DB에도 "2007-07-23 오전 12:52"같은 형식으로 들어가는데 그럼 이것을 어떻게 계산을 해야하는가? 일단 그냥 빼기를 해서는 계산이 되지를 않았다. C#에서는 연산자 오버로드를 할 수 있으므로 연산자 오버로드를 해야하는가 하면서 이것저것 뒤지다가 나온 것인 TimeSpan이다. 둘다 System네임스페이스를 사용한다. TiemSpan은 시간 간격을 나타내는 구조체이다. DateTime을 계산하기 위해서 사용한다. 일단 소스를 보자. (Language : cpp) DateTime end = Da..
Download source and demo project - 195.1 KB Introduction I've been working with sockets since 2000, using Delphi 5.0 and some third-party libraries (Synapse). My very first socket application just copied files between many clients and one server. The client app checks a folder to see if files exist, asks the server where to copy the files in the network and, after copying the files, flags the da..
Download source files - 9.57 Kb Introduction I had been trying to include updater block in my application. The quick starts that came along with the application block had some real neat examples, but it took quite some time to figure out what files must be placed where, what settings needed to be made and how, to get a sample of my own working. So, I thought I would post the sample implementatio..
- Total
- Today
- Yesterday
- Tech News
- Reverse Engineering
- Web Programming
- Life News
- Military
- win32
- diary
- Mabinogi
- Network Inspector
- wallpaper
- cartoon
- WDB
- BadCode
- 3D Engine
- Embedded System
- Information Processor
- USB Lecture
- 프리랜서로 살아남는 법
- console
- network
- Linux
- C#
- 짤방 및 아이콘
- medical
- Battle
- 나비효과
- 야마꼬툰
- 막장로그
- humor
- Assembly
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |