• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

超漢字アプリケーション開発用のProtocol Buffersコンパイラの開発


Commit MetaInfo

Revisão0c2ddc4bf2a0b8e0f229207ba0faa010789aee5e (tree)
Hora2015-06-26 02:29:55
Autorornse01 <ornse01@user...>
Commiterornse01

Mensagem de Log

add releasing embedded message object.

Mudança Sumário

Diff

--- a/src/protobuf/template.c.erb
+++ b/src/protobuf/template.c.erb
@@ -50,6 +50,13 @@ LOCAL VOID <%= m.name %>__initialize(<%= m.name %> *m)
5050
5151 LOCAL VOID <%= m.name %>__finalize(<%= m.name %> *m)
5252 {
53+ <%- m.each_field do |f| -%>
54+ <%- if f.is_singular_embedded_message? -%>
55+ if (m-><%= f.name %> != NULL) {
56+ <%= f.to_c_type %>__delete(m-><%= f.name %>);
57+ }
58+ <%- end -%>
59+ <%- end -%>
5360 }
5461
5562 EXPORT <%= m.name %>* <%= m.name %>__new()