| От | Gevik Babakhani |
|---|---|
| Тема | Re: Which MemoryContext? |
| Дата | |
| Msg-id | 004801c87460$7358eff0$0a01a8c0@gevmus обсуждение исходный текст |
| Ответ на | Re: Which MemoryContext? (Alvaro Herrera <alvherre@commandprompt.com>) |
| Список | pgsql-hackers |
> All local memory is safe to handle that way. In my case I am reallocating memory for a global variable between transactions. I wanted to make sure I don't leave allocated memory behind. > The problem only arises when you have memory to release _earlier_ than that. First I was looking for a way to free my allocated memory before exit. I found the proc_exit hook mechanism but I am not sure where to setup this hook. Given allocating memory in TopMemoryContext is the same as malloc, then I'll just leave my allocated memory to be freed automatically when exit. Thank you :) Regards, Gevik
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера