c_glib leaks memory
-------------------
Key: THRIFT-1583
URL: https://issues.apache.org/jira/browse/THRIFT-1583
Project: Thrift
Issue Type: Bug
Components: C glib - Compiler
Affects Versions: 0.8, 0.9
Environment: Compile this files:
{code}
namespace c_glib Kms
namespace * com.kurento.commons.mediaspec
include "payload.thrift"
include "transport.thrift"
enum MediaType {
AUDIO,
VIDEO
}
enum Direction {
SENDONLY,
RECVONVLY,
SENDRECV,
INACTIVE,
}
struct MediaSpec {
1: required list<payload.Payload> payloads,
2: required set<MediaType> type,
3: required transport.Transport transport,
4: required Direction direction,
}
{code}
{code}
namespace c_glib Kms
namespace * com.kurento.commons.mediaspec
struct PayloadRtp {
1: required i32 id,
2: required string codecName,
3: required i32 clockRate,
4: optional i32 channels,
5: optional i32 width,
6: optional i32 height,
7: optional i32 bitrate,
50: optional map<string, string> extraParams,
}
struct Payload {
1: optional PayloadRtp rtp,
}
{code}
{code}
namespace c_glib Kms
namespace * com.kurento.commons.mediaspec
include "mediaSpec.thrift"
struct SessionSpec {
1: required list<mediaSpec.MediaSpec> medias,
2: required string id;
3: optional string version;
}
{code}
{code}
namespace c_glib Kms
namespace * com.kurento.commons.mediaspec
struct TransportRtp {
1: string address,
2: i32 port,
}
struct Transport {
1: optional TransportRtp rtp,
}
{code}
Reporter: José Antonio Santos
Fix For: 0.9, 0.8
The generated code has memory leaks if you create and destroy an object.
I've fixed the main problem on this git repo on branch c_glib_0.8.x but commits
can be moved to trunk easily.
https://github.com/jcaden/thrift
There are still some errors to control on generated code (there are comments in
the code). I'm planning to fix in a short term if you validate the current
patches.
This git repository has also the patches sent on issues 1582 and 1578 that are
also related:
https://issues.apache.org/jira/browse/THRIFT-1582
https://issues.apache.org/jira/browse/THRIFT-1578
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira