[postgis-devel] question about memory leak when deserialize
Tom Lane
tgl at sss.pgh.pa.us
Wed Jun 11 23:12:49 PDT 2008
"=?GB2312?B?s8LV8Q==?=" <zhenchen17 at gmail.com> writes:
> I have a question on memory leak when deserialize.
> In the fuctions such as lwmpoly_deserialize, lwmline_deserialize and
> lwmpoint_deserialize, there is a temporal variable named insp which is
> defined as LWGEOM_INSPECTED *insp; It allocated memory when it
> initialized in the statement : insp = lwgeom_inspect(srl);
> However, when finished, nowhere to free this memory which causes
> memory leak.
You've provided no context whatsoever. In very many cases within
Postgres, a function need not worry about "leaking" palloc'd space
because the space will soon get reclaimed anyway. If you have an
example where you're seeing a serious practical leak, please
provide details.
regards, tom lane
More information about the postgis-devel
mailing list